Question #37

Author: admin
tags: JavaScript  
let x = 1;

ob: {
  x = 2;
  for (let ob = 5; ob < 6; ob++) {
    x = 3;
  }
  break ob;
  x = 4;
}

console.log(x);
What will the console output be?
1
2
3
4
It will output nothing, because there is an error in the code.
Here, a block of code (block statement) is used in curly brackets. This block is marked with the ob label.
This label name was chosen to confuse you more.
Block execution is interrupted after the break ob statement.
Rate the difficulty of the question:
easyhard