Returning from a constructor

“… if you try to return anything [from a constructor] that is not an object [emphasis mine], the constructor will proceed with its usual behavior and return this.”
From Object-Oriented JavaScript by Stoyan Stefanov

Leave a Reply

Your email address will not be published. Required fields are marked *