Logo

Programming-Idioms

History of Idiom 51 > diff from v39 to v40

Edit summary for version 40 by javajosh:
[JS] To make it better.

Version 39

2019-09-26, 17:21:23

Version 40

2019-09-26, 18:18:21

Idiom #51 Check if map contains key

Determine whether map m contains an entry for key k

Illustration

Idiom #51 Check if map contains key

Determine whether map m contains an entry for key k

Illustration
Extra Keywords
table dictionary hash
Extra Keywords
table dictionary hash
Code
k in m
Code
k in m
Comments bubble
This will lookup a property in the object and it's entire prototype chain.
Doc URL
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/in
Demo URL
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/in