DEV Community

Discussion on: 8 Nice tricks Front-end Developers

Collapse
 
daviddomingoslalom profile image
David Domingo

So, the in operator returns true if the specified property is in the specified object or its prototype chain.

reference

I wouldn't recommend using it. But thank you for the datalist tag and the math tag! I had no idea those existed.

Collapse
 
sebring profile image
J. G. Sebring

if the specified property is in the specified object or its prototype chain

That makes it more handy than simply array length indeed - could be handy I guess, not sure I'll use it either. However I'm looking forward to start using optional chaining as it get more support, like let myCar = car?.make