Skip to content
Latest: Publish JavaScript Packages to NPM Like a Pro!

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