Sovi.AI - AI Math Tutor

Scan to solve math questions

QUESTION IMAGE

17 multiple choice 1 point what number will be output by the console.lo…

Question

17 multiple choice 1 point what number will be output by the console.log command on line 7? 1 var fizz; 2 var bop; 3 bop = 10; 4 fizz = 20; 5 bop = 100; 6 fizz = 200; 7 console.log(bop); 20 200 100 10

Explanation:

Step1: Analyze variable assignment

Variables fizz and bop are declared. Then bop is first assigned 10 (line 3), then fizz is assigned 20 (line 4), after that bop is reassigned 100 (line 5), and fizz is reassigned 200 (line 6).

Step2: Determine output

The console.log(bop) on line 7 will output the last - assigned value of bop. Since the last assignment to bop is bop = 100 (line 5).

Answer:

100