[Solved] "Up arrow key was pressed" not always printing - Why?

How comes when Rick presses the up arrow key multiple times it only prints it out once? where as when I press the up arrow key it prints “up arrow key was pressed” every time followed by the new guess;

image

Im aware that later in the video Rick asks up to tidy up our code and that line is then removed entirely however im curious as to why Rick’s only prints once even though he continuously pressed the up arrow key as per the above screen shot.

Cheers, Tom

Hi Thomas,

Rick enabled “Collapse” in his Console. Do you see the numbers next to the messages?

image

If he disabled “Collapse”, the messages would appear x times where x is the number you see when “Collapse” is enabled.

Did this clear it up?

Yes, makes perfect sense, Thank you!

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.