I've tried this in Chrome, Opera, Microsoft Edge, Internet Explorer and Mozilla Firefox and still gotten the same case: A ReferenceError
exception is not thrown that the variable I assigned a value is not defined.
The syntax is:
// Where `identifier_name` was not formally declared/ initialized.
(function() {})(identifier_name = 2)
Why does this behavior occur?
Edit: Just to add, this doesn't work if what is being assigned is a property of an object i.e.:
// Throws a ReferenceError that `object_name` is not defined.
(function() {})(object_name.property_name = 2)