Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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 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

Step: 1

21 The given for loop has a syntax error in the update statement 1 1 2 which s... blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

C++ Primer Plus

Authors: Stephen Prata

6th Edition

978-0321776402, 0321776402

More Books

Students also viewed these Programming questions

Question

Date decision to be made (if known)

Answered: 1 week ago