Would you like to clone this notebook?

When you clone a notebook you are able to make changes without affecting the original notebook.

Cancel

JavaScript Object.create() hasOwnProperty

node v14.20.1
version: 1.0.0
endpointsharetweet
const obj = Object.create(null); obj.propA = 'Value'; obj.propB = false; console.log('propA:', obj.hasOwnProperty('propA')); // Uncaught TypeError: obj.hasOwnProperty is not a function console.log('propC:', obj.hasOwnProperty('propC')); // Uncaught TypeError: obj.hasOwnProperty is not a function
Loading…

no comments

    sign in to comment