Logo

Programming-Idioms

History of Idiom 51 > diff from v41 to v42

Edit summary for version 42 by Haestrom:
New JS implementation by user [Haestrom]

Version 41

2019-09-26, 18:19:52

Version 42

2019-09-26, 18:31:08

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
_m.has(_k)
Comments bubble
Uses an actual Map instance, rather than relying on objects and their keys
Doc URL
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map