Answered step by step
Verified Expert Solution
Link Copied!

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

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

Step: 3

blur-text-image

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

Database Development For Dummies

Authors: Allen G. Taylor

1st Edition

978-0764507526

More Books

Students also viewed these Databases questions

Question

3. Give examples of four fair disciplinary practices.

Answered: 1 week ago

Question

4. Explain how to use fair disciplinary practices.

Answered: 1 week ago