Skip to content
🧠 Master React Package Creation — Claim Your Spot

Edit It: Does omitting the return keyword cause an object to inherit its constructor's prototype?

Home>new Operator in JavaScript>Edit It: Does omitting the return keyword cause an object to inherit its constructor's prototype?

Edit It: Does omitting the return keyword cause an object to inherit its constructor's prototype?

This code shows that omitting the return keyword makes an object inherit its constructor's prototype property.

See it on StackBlitz