All right! Last one: let’s do something about the decidedly un-Ruby for loop in the editor.

10.times do puts "Knock knock." puts "Who's there?" end



Let’s finish up by refactoring the for loop on the right to use .times instead.

Take this course for free

Mini Info Outline Icon
By signing up for Codecademy, you agree to Codecademy's Terms of Service & Privacy Policy.

Or sign up using:

Already have an account?