View Problem

Check if a key exists in a map

Given a map pets {joe:cat,mary:turtle,bill:canary} print "ok" if an pet exists for "mary"
ExpandDiskEdit
fantom
map := ["joe":"cat", "mary":"turtle", "bill":"canary"]
if (map.containsKey("mary")) echo("ok")

Submit a new solution for fantom
There are 29 other solutions in additional languages (clojure, cpp, erlang, fsharp ...)