Conversion to an object (Definition)

Converting values to a object structured representation.

There are three conversions to study. Obviously Object values will remain as they are.

This table summarizes the effects of converting values to objects:

Value:Object representation:
nullAn error
Undefined valueAn error
Empty stringString object
Non-empty stringString object
0Number object
NaNNumber object
InfinityNumber object
Negative infinityNumber object
Any other non-zero numberNumber object
Boolean trueBoolean object
Boolean falseBoolean object