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