asked 97.7k views
4 votes
What number will be output by the console.log command on line 5?

A. 10
B. 25
C. 30
D. 35

What number will be output by the console.log command on line 5? A. 10 B. 25 C. 30 D-example-1
asked
User Antot
by
7.8k points

1 Answer

5 votes

Answer:

The output is 35

Step-by-step explanation:

Required

Determine the output on line 5

We start by analysing the program line by line.

On line 1: kit = 20

On line 2: roo = 10

On line 3: kit = kit + 5

Substitute 20 for kit.

So, we have

kit = 20 + 5

kit = 25

On line 4:

roo = kit + roo

Substitute values for kit and too

roo = 25 + 10

roo = 35

On line 5: Output roo

So, 35 is displayed as an output

answered
User Koichi
by
7.7k points

No related questions found