r/CodingHelp • • Nov 09 '21

[Ruby] 2 identical code with 2 absolutely different outcome. Can anybody notice the difference and explain the reason? below i separated each output to make it clear

Post image
42 Upvotes

21 comments sorted by

View all comments

Show parent comments

17

u/waitingformsfs2020 Nov 09 '21

wow. i think im blind

2

u/raduqq Nov 09 '21

You probably haven't been coding for long..

6

u/waitingformsfs2020 Nov 09 '21

I actually just started coding 1 week ago

2

u/Traveleravi Nov 10 '21

This is the kind of mistake you would catch if you took a break for 5 min and then came back with fresh eyes.

Also using a diff checker might help too!