function abc(){
a:'b';
c:'f';
f:'t';
};
This snippet does not throw an error in console. I want to understand whats happening with the variables inside the function. Hows it being interpreted by the javascript engine.
function abc(){
a:'b';
c:'f';
f:'t';
};
This snippet does not throw an error in console. I want to understand whats happening with the variables inside the function. Hows it being interpreted by the javascript engine.
Those are not variables, they are labels.
They can be used like this (example from How can I use goto in Javascript?):
LABEL1: do {
x = x + 2;
...
// JUMP TO THE END OF THE DO-WHILE - A FORWARDS GOTO
if (x < 100) break LABEL1;
// JUMP TO THE START OF THE DO WHILE - A BACKWARDS GOTO...
if (x < 100) continue LABEL1;
} while(0);