What is this : sign after a variable JS syntax?
Any JavaScript statement (kind-of except function declarations) can be preceded by a label: foo: var x = 0; What you’ve got there is something like that: $: doubled = 6 * 2; In your statement, “$” is the label. There’s not much point to labelled statements because there’s no goto in JavaScript. Both break and … Read more