Sovi.AI - AI Math Tutor

Scan to solve math questions

QUESTION IMAGE

1 point what number will be output by the console.log command on line 5…

Question

1 point
what number will be output by the console.log command on line 5?
1 var kit = 20;
2 var roo = 10;
3 kit = kit + 5;
4 roo = kit + roo;
5 console.log(roo);
35
30
25
10

Explanation:

Step1: Calculate the value of kit

Given that initially kit = 20, then kit = kit + 5. Substituting the value of kit, we get kit=20 + 5=25.

Step2: Calculate the value of roo

Since roo = kit+roo, and initially roo = 10, now with kit = 25, then roo=25 + 10=35.

Answer:

35