Question: 21. (4 pts) What will the following for loop write to the console? for(i=0; i < 10; i-i+2) console.log(i+ ); { } 22.

21. (4 pts) What will the following for loop write to the 

21. (4 pts) What will the following for loop write to the console? for(i=0; i < 10; i-i+2) console.log(i+ " "); { } 22. (3 pts) Write a function that takes in one parameter and sets the background color of an element with the id 'header' to the parameter. For example, if you name your function setColoc() then the function call set Coloc('red') will set the background color of an element with the id of 'header' to 'red'.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

21 The given for loop has a syntax error in the update statement 1 1 2 which s... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!