MCQs > IT & Programming > Ruby On Rails > What's an equivalent way of performing the following (h is a Hash): h.each { |k,v| h.delete k if k.nil? }

Ruby On Rails MCQs

What's an equivalent way of performing the following (h is a Hash): h.each { |k,v| h.delete k if k.nil? }

Answer

Correct Answer: h.delete_if { |k,v| k.nil? }

Explanation:

Note: This Question is unanswered, help us to find answer for this one

Ruby On Rails Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it

search

Ruby On Rails Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it