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() with Object.hasOwn()

node v17.9.1
version: 2.0.0
endpointsharetweet
const obj = Object.create(null); obj.propA = 'Value'; obj.propB = false; console.log('propA:', Object.hasOwn(obj, 'propA')); // "propA: true" console.log('propC:', Object.hasOwn(obj, 'propC')); // "propA: false"
Loading…

no comments

    sign in to comment