7.

"You win!" never displays. What line is responsible for this error?

1

var score

0

2

onEvent

"button2"

"click"

function

3

var score

score + 1

if

score

5

setText ("display", "You win!");

A. 1

B. 3

ОООО

C. 4

D. 5

Respuesta :

Answer:

The answer is "4".

Explanation:

In this code, on line number 4, it will give the error message, and its correct solution can be defined as follows:

In this code, a variable "score" is declared, that holds a value that is 0, and in the next step, a method "onEvent" is declared that uses a method, and in the if block, it checks the "score" value that is less than 5 and it will print the message.