Let’s do a quick exercise to put into practice the new stuff we have just learned about the conditionals and loops.
Task 1 - Create a script that counts from 0 to 30.
Expected output:
0
1
2
3
…
28
29
30
while() {
}
Task 2 - Change the previous script to write “ten” when the value of i
is 10, and “twenty” when the value if 20.
Expected output:
0
1
…
9
ten
11
…
19
twenty
21
…
30
while() {
}