Logo

Programming-Idioms

History of Idiom 51 > diff from v28 to v29

Edit summary for version 29 by programming-idioms.org:
New Ruby implementation by user [programming-idioms.org]

Version 28

2016-10-29, 13:24:43

Version 29

2016-11-28, 22:32:34

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.key?(k)
Doc URL
http://ruby-doc.org/core-2.2.3/Hash.html#method-i-key-3F
Demo URL
https://repl.it/E9qh/0