Ruby - Hashes
Which of the following is the correct syntax to use
dig on a hash h = {x: {y: 10}} to access the value 10?dig on a hash h = {x: {y: 10}} to access the value 10?dig method call syntaxdig is called with parentheses and keys as arguments, like dig(:x, :y).h.dig(:x, :y) uses correct method call syntax with symbols as keys.15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions