According to the ECMAScript standard, labels can be applied to all statements.
This means that the following lines are valid:
myLabel: throw 'whatever'
as well as
function foo() {
myLabel: return 'whatever'
}
console.log(foo())
But these labels appear to be unusable, which begs the question: why are they allowed? (Or maybe I have a fundamental misunderstanding)