includes operator javascript on object value for a specific key code example
Example: js object contain key
if ('key' in myObj)
// better
if (!myObj.hasOwnProperty('key'))
if ('key' in myObj)
// better
if (!myObj.hasOwnProperty('key'))