Hi all,
I'm learning ruby now and I have this exercise on which I'm stuck but can't figure out why. The picture says it all. I'm supposed to write a loop, it's supposed to end by "end" which it does but I get the error message that a keyword_end is expected.... I tried everything I could think of so now I'm asking help to see what I'm missing.
Take care all and thanks for your help.
Top comments (1)
You need a second end.
Whenever you use the .each do, you essentially open a block of code. And all blocks need to be terminated with end.
So the correct version of the code would be