@vaporeon_ nope
@vaporeon_ after a little searching someone in 2009 made a preprocessor for the language that adds goto but the library can only be found in an internet archive page and the internet archive is currently down
@vaporeon_ it would be found here: https://web.archive.org/web/20160507105653/http://summerofgoto.com/js/goto.js
@wallhackio I think the one time I had to use JavaScript, I found out that my specific use-case for goto in that particular program could be done with something called... Labelled branch? Labelled break? Something like that. Do you know what I'm talking about and what it's actually called?
@wallhackio Oh, never mind, æscling just told me that it's called a "labelled statement": https://glaceon.social/@aescling@cat.family/117118581901813067
It can be used to break out of nested loops properly.
@vaporeon_ @wallhackio you can purrobably do cool nasty hacks with them since the labeled statement can seemingly just be an arbitrary code block
label1: {
// ...
}
but idk it seems a bit limited
@vaporeon_ @wallhackio like idk how you’d do the goto err; pattern with something like this
@vaporeon_ @wallhackio well.
let isErr = false;
err: {
if (isErr) {
// ...
} else {
// ...
isErr = true;
break err;
// ...
}
}
but that's terrible lol
@vaporeon_ I was not aware of this feature!
Apparently you can create "labelled statements" for anything considered a "statement", for which I believe include for, while, switch, and if/else if/else
@wallhackio @vaporeon_ blocks are also statements iirc
@wallhackio Rude of them. Then how are you supposed to do a conditional jump to a label in JavaScript?!