JavaScript While Loop

Offered By
Coursera Project Network
In this Guided Project, you will:

Explain the advantages of repetition programming.

Write JavaScript code that includes a working While Loop.

Conduct testing to ensure that a JavaScript While Loop solves a logic problem.

Clock2 hours
IntermediateIntermediate
CloudNo download needed
VideoSplit-screen video
Comment DotsEnglish
LaptopDesktop only

In this intermediate-level project you will examine the concept of repetition programming – also called “looping." Using the Notepad++ editor and JavaScript embedded in HTML, you will write the JavaScript code to repeat a block of program code while a particular condition is true. As you work with the While Loop you’ll begin to realize why repetition programming is one of the most important features of computing. Note: This course works best for learners who are based in the North America region. We’re currently working on providing the same experience in other regions.

Skills you will develop

Do/While LoopJavaScript LooploopingWhile LoopRepetition Programming

Learn step-by-step

In a video that plays in a split-screen with your work area, your instructor will walk you through these steps:

  1. Examine the concept of repetition programming and describe its advantages.

  2. Experience the looping process by running a program that repeats a process.

  3. Use Notepad++ to write JavaScript code that contains a While Loop, and test the code in Chrome.

  4. Examine and test JavaScript code that includes an example of a Do/While loop.

  5. Examine a problem solution using an IF-Else statement and compare it to the Switch statement that solves the same problem.

How Guided Projects work

Your workspace is a cloud desktop right in your browser, no download required

In a split-screen video, your instructor guides you step-by-step

Frequently asked questions

Frequently Asked Questions

More questions? Visit the Learner Help Center.