r/badcode • • May 19 '23

js Ouch...

Post image
303 Upvotes

48 comments sorted by

View all comments

Show parent comment

0

u/JackMalone515 May 19 '23

I know for c++ this will just assign and then it'll be true so it would always happen, I assume JavaScript is similar