Day 8 - Loops!
Housekeeping
- Late start challenge for a 9am start tomorrow - Submit either:
- a solution to one of these
forloop exercises, OR; - an Achievement for Round 2.
- a solution to one of these
- Achievements Round 1 marks returned after lunch
1. Phrase Generator Setup
Today we’ll build a form that generates a multi-word phrase similar to Tony’s Random Band Generator.
2. for Loop
Materials
- MDN:
forstatement
Demo: Output 1-100 as a bulleted list
- Starter Code: Print 1-to-100 with a
forLoop
Activity: Loop exercises
Practice loops with the exercises listed in this article:
3. Demo: Phrase Generator
Let’s finish off our Phrase Generator using our knowledge of for loops.
4. Lab Time
- Late start challenge
- Assignment 2
- Achievements Round 2
Prep
Reading list
- MDN:
forstatement- Note: there are a lot of ways to loop; we’ll stick with
forfor now;
- Note: there are a lot of ways to loop; we’ll stick with
- Gist: Print 1-to-100 with a
forLoop
Watch list
- Video:
forLoop by Mosh Hamedani
Search list
- “beginner js for loop exercises”
