CSCI 185: Fall 2022

Introduction to Programming for the Web

CSCI 185: Fall 2022

Fish by @akeatk

Lectures > 14. Loops

In this lesson, we’re going to go over while loops and for loops – ways of allowing your program to repeat code for a specified number of iterations. Being able to repeat code blocks (also know as “looping” or “iterating”) is very powerful, and will allow you to easily perform repetitive tasks in a variety of different contexts: playing songs, drawing pictures, building animations, doing data processing, and so forth. Please do the assigned readings – they will help you get a solid foundation of JavaScript loops.

Today's Activities

For today, please do the following:

1. Download the Exercise Files

Exercise Files

2. Complete the Assigned Readings

  1. Using While Loops and Do...While Loops in JavaScript. Digital Ocean
  2. For Loops, For...Of Loops and For...In Loops in JavaScript. Digital Ocean

3. Review the Slides

  1. While Loops & Lists

4. Watch the Lecture Video(s)

Link Title Type Duration
Video 1 Intro to Loops (12:30-1:45PM) lecture 1:08:30
Video 2 Intro to Loops (3:30-4:45PM) lecture 1:18:53