Submitted by Dacadey t3_z89cro in explainlikeimfive
cabbeer t1_iyd86ow wrote
Reply to comment by Sloloem in ELI5: why is using "goto" considered to be a bad practice in programming? by Dacadey
Wow, you’re really good at explaining programming… what would go to look like in JavaScript? Or is that not possible because it’s single threaded?
Sloloem t1_iydwukt wrote
GOTO would work fine in a single threaded environment, you can't use it in javascript just because javascript doesn't have a GOTO statement. If it did it would probably look the same as it does anywhere that does have it where you pair GOTO some_label
with a line of code reading :some_label
to give the GOTO a target line. Not sure why they didn't include it.
Viewing a single comment thread. View all comments