05 - Loops in JavaScript
05 - Loops in JavaScript
while loop
Note:
❑ Avoid infinite loop
do-while loop
for-of loop
for-in loop
Challenge 1:
Solution:
Challenge 2:
Solution:
1. Calculate sum of first ‘n’ numbers.
2. Calculate the sum of numbers from ‘m’ to ‘n’.
3. Print all odd numbers from 0 to ‘n’.
4. Create a “Number Knock” game. (ask the user to keep guessing the number
until the user enters correct guess) .
5. Simple Password Checker (Fixed Attempts)
6. Create a program to find the factorial of ‘n’.
7. Print the following pattern. (build it for nth numbers)
Build a Simple Text-Based Adventure Game