Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Testing Break using the Console: Create an infinite while loop. note: this may lock up your browser. You may want to code this in a

Testing Break using the Console:

Create an infinite while loop. note: this may lock up your browser. You may want to code this in a blank page and use a debugger. Do not use alert! Use the constant 2 for the conditional in the while loop: while(2)

This loop will run forever because 2 is a constant and will always be true. (Be careful, you may have to restart the browser!) In fact, false is only: 0, null, undefined, false, or "" anything else is considered true.

You will need to use break; to get out of this loop. Each iteration of the loop will log a counter number. Only log out 4 lines to match the required output.

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

Introduction To Constraint Databases

Authors: Peter Revesz

1st Edition

1441931554, 978-1441931559

More Books

Students also viewed these Databases questions

Question

Define separation.

Answered: 1 week ago

Question

LO3 Name the seven categories of HR functions.

Answered: 1 week ago