IDNLearn.com provides a user-friendly platform for finding answers to your questions. Discover reliable answers to your questions with our extensive database of expert knowledge.

10. There is repeated code in these onevent blocks. Choose the correct code for the updateScreen() function which would be called in each of the onEvent blocks.

1

var counter

0;

2

3

onEvent("upButton", "click",

function

4

counter

counter + 1;

5

setText ("counter_label", counter);

set Property ("counter_label", "text-color",

6

"red");

7

if

counter

8

set Property ("counter label",

"font-size", 24);

9

10

11

onEvent ("downButton",

"click",

function

12

counter

counter


Sagot :

Answer:

front zise24

Explanation:

on event down botton

The correct code for the updateScreen() function which would be called in each of the onEvent blocks is setText ("counter_label" counter) = = 0.

What is a function?

A function refers to a set of statements that makes up an executable code and it can be used in a software program to perform a specific task on a computer.

In this scenario, the correct code for the updateScreen() function is written as follows:

function updateScreen()   { ⇒

       setText ("counter_label" counter)  {

       if (counter == 0);

          setProperty ("counter_label", "font-size", "24") ;

       }                         +

}

In conclusion, the executable code for the updateScreen() function which would be called in each of the onEvent blocks is "setText ("counter_label" counter) = = 0."

Read more on function here: brainly.com/question/20264183

#SPJ2

View image Lanuel
Your presence in our community is highly appreciated. Keep sharing your insights and solutions. Together, we can build a rich and valuable knowledge resource for everyone. IDNLearn.com is committed to providing the best answers. Thank you for visiting, and see you next time for more solutions.