I am reading a book about single-page applications and at some point there is this for...in loop:
KEYVAL:
for(key_name in arg_map){
if(arg_map.hasOwnProp
It is for break and continue.
Check the MDN
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/label
KEYVAL:
is a label here which is used in your loop for iteration the operations. Look at the documentation
It is similar to GOTO statements.
What it does in your code is when this condition become true
if(key_name.indexOf('_') === 0) continue KEYVAL;
its go to the label KEYVAL:
and run the loop again without executing the code below this line.
It is a label
, sort of a line-number but not locked to a line position.
Continue jumps to this label like a GOTO.
When this criteria is furfilled:
if(key_name.indexOf('_') === 0) continue KEYVAL;
JavaScript continues from that label above.