Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR RUBY

ruby hash delete

h = { "a" => 100, "b" => 200 }
h.delete("a")                              #=> 100
h.delete("z")                              #=> nil
h.delete("z") { |el| "#{el} not found" }   #=> "z not found"
Source by apidock.com #
 
PREVIOUS NEXT
Tagged: #ruby #hash #delete
ADD COMMENT
Topic
Name
6+1 =