Ruby - Enumerable and Collection Processing
Which of the following is the correct syntax to find the first even number in an array nums using find?
nums = [1, 3, 4, 6]
Which of the following is the correct syntax to find the first even number in an array nums using find?
nums = [1, 3, 4, 6]
find{ |n| n.even? }. Others have syntax errors.15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions