- Fork this repo and
git clone
it down to your computer - Create two files
index.html
andscript.js
- Include
script.js
inindex.html
using a<script>
tag - Open
index.html
in your web browser and open the console - After answering each section below,
git commit
your work - When you're finished or when time is up, push your work to your remote repo, file a Pull Request, and react with a green check on Zoom
Using a for
loop, print every second number e.g. 0, 2, 4, 6, 8.
Using a for
loop, print backwards from 9 to 3 e.g. 9, 8, 7, 6, 5, 4, 3.
Write a program that prints exactly the following using a for
loop:
9 Times Table
================
9 times 0 is 0
9 times 1 is 9
9 times 2 is 18
9 times 3 is 27
9 times 4 is 36
9 times 5 is 45
9 times 6 is 54
9 times 7 is 63
9 times 8 is 72
9 times 9 is 81
9 times 10 is 90
================
Use a for
loop that will iterate from 1 to 20. For each iteration, check if the current number is even or odd, and log it in the console (e.g. "2 is even").
1 is odd
2 is even
3 is odd
4 is even
5 is odd
// etc