Search⌘ K

Quiz on Variables and Constants

Check your understanding of variables and constants.

We'll cover the following...
Technical Quiz
1.

What’s the output of this code?

function first() {
  for(i = 0; i < 5; i++) {
      second(); 
  }
}
function second() {
  for(i = 0; i < 3; i++) {
      console.log(i); 
  }
} 
first();
A.

0 1 2 0 1 2 0 1 2 0 1 2 0 1 2

B.

The program will not terminate.

C.

0 1 2 0 1 2


1 / 5