Skip to content
Branch: master
Find file History
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
..
Failed to load latest commit information.
.DS_Store
JohnAdemoye.html
Oluwaseyi.html
README.md
chinkeki.html

README.md

Project JavaScript F1 Loops

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

  1. Create a html file with your name like john.html
  2. Add current code to that file:
<!DOCTYPE html>
<html>
  <body>
    <script>
      // your code here
    </script>
  </body>
</html>
  1. Create a for loop and log odd numbers from 1 to 11:
  2. Create a for loop and log even numbers from 11 to 1 in reverse:
  3. Define an array named myList and put these items into it:
  • Fruits
  • Milk
  • Cheese
  • Baken
  • Bread
  1. Log all item in the array into console with a for loop.

  2. Create new array named fruits and set it to[['apple','orange','banana],['coconut','cumbersome'],['starbery','bluebery']]

  3. Create nested for loops to log all items inside fruits in seperate lines.

  4. Use do while to log myList items in reverse mode. First log Bread, then Baken , etc

Want to get reviewed?

Send Pull Request. Check how to deliver your code: https://codingwithbasir.com/how-to-deliver-projects/

Need help?

Download Learn JavaScript eBook from https://codingwithbasir.com/learn-javascript

You can’t perform that action at this time.