Answers for "object contains property javascript"

0

object contains property javascript

if (x.hasOwnProperty('y')) {}

//or

if ('y' in x) {}

//or

if (x?.y){}
Posted by: Guest on March-15-2021

Code answers related to "object contains property javascript"

Code answers related to "Javascript"

Browse Popular Code Answers by Language