Has Value (associative array)

From SwiftAPI

Jump to: navigation, search


Ruby

Ruby-Doc.org

a = {"test" => 4, "foo" => 2}
 
b = a.has_value?(4)
# b == true
 
b = a.has_value?(10)
# b == false
Personal tools