If the constructor function has a return
, then when the constructor is called, even with the new
operator, the usual behavior may change.
If an object is returned in return
and not a primitive value, then this object is returned.
By the way, after executing the code from this task, the num
property with the value 5 was created in the window
object.