Answered step by step
Verified Expert Solution
Question
1 Approved Answer
JavaScript 22 What will the following program display? function loopIt() { var i = 0; var j = 0; var x = 0; for (i
JavaScript
22 What will the following program display?
function loopIt() {
var i = 0; var j = 0; var x = 0;
for (i = 0; i < 3; i++) {
x = i;
for (j = 1; j < 5; j++)
{ x = x * j;
document.write(x + " ");
} document.write("
");
}
}
26 What is wrong with the following nested loops?
for (var i = 0; i < 6; i++)
{
for (var i = 3; i < 12; i++)
{ document.write("Ooops!
");
}
}
28 Write a function that will draw a shape on a web page. The break statement yshape should look like this:
**********
*
*
**********
*
*
**********
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started