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

Solved
Show answers

Ask an AI advisor a question