209k views
5 votes
What number will be output by the console.log command on line 5?*

1. var oop= 10;
2.oop =oop + 1;
3.оор= oop + 2;
4.oop=oop + 3;
5. console.log(oop);

User Cole Reed
by
5.6k points

1 Answer

4 votes

Answer:

16 will be output by the console.log command on line 5

Step-by-step explanation:

Let us look at the code line by line

1. var oop= 10;

This line will assign the value 10 to the variable oop

2.oop =oop + 1;

This line will add 1 to the value of oop

oop = 10+1 = 11

3.оор= oop + 2;

This line will add 2 to the latest value of oop.

oop = 11+2 = 13

4.oop=oop + 3;

This line will ad 3 to the latest value of oop.

oop = 13+3 = 16

5. console.log(oop);

This line will print 16 to the console.

Hence,

16 will be output by the console.log command on line 5

User Nobillygreen
by
6.5k points