Topics: Repeating Tasks Manually , The For Loop , Looping in Reverse , Looping through Arrays , Nested Loops , The While Loop , Do...While Statements , The break Keyword
Project Title: Shopping List
- Create a html file with your name like john.html
- Add current code to that file:
<!DOCTYPE html> <html> <body> <script> // your code here </script> </body> </html>
- Create a for loop and log odd numbers from 1 to 11:
- Create a for loop and log even numbers from 11 to 1 in reverse:
- Define an array named
myListand put these items into it:
Log all item in the array into console with a for loop.
Create new array named
fruitsand set it to
Create nested for loops to log all items inside
fruitsin seperate lines.
Use do while to log
myListitems in reverse mode. First log
Want to get reviewed?
Send Pull Request. Check how to deliver your code: https://codingwithbasir.com/how-to-deliver-projects/