Many sources like MDN and this tutorial define a concept called "constructor" that should be used with the new
keyword to create an instance in traditional OOP's sense. But what "constructor" means is not formally stated.
It seems to me that literally any function can be used with new
. (Though function without any manipulation to this
in its definition is not particularly useful when new
ed, because it merely returns an empty object). Is this correct?