Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

Object.hasOwnProperty.call

const data = {
	a: 'a value'
}
// esnext, esm valid
const hasA = Object.hasOwnProperty.call(data, 'a'); // true
// browser, vanillajs, esnext, esm, commonjs
const hasA = data.hasOwnProperty('a'); // true
 
PREVIOUS NEXT
Tagged:
ADD COMMENT
Topic
Name
7+9 =