...

/

Quiz on Variables and Constants

Quiz on Variables and Constants

Check your understanding of variables and constants.

We'll cover the following...
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

Question 1 of 50 attempted
Access this course and 1400+ top-rated courses and projects.