Even/Odd Counter
Write a for loop that will iterate from 0 to 20. For each iteration, it will check if the current
number is even or odd, and report that to the screen (e.g. “2 is even”)
Report
The Reading List
Keep track of which books you read and which books you want to read!
Create an array of objects, where each object describes a book and has properties for the title
(a string), author (a string), and alreadyRead (a boolean indicating if you read it yet).
Iterate through the array of books. For each book, log the book title and book author like so:
“The Hobbit by J.R.R. Tolkien”.
Now use an if/else statement to change the output depending on whether you read it yet or not.
If you read it, log a string like ‘You already read “The Hobbit” by J.R.R. Tolkien’, and if not,
log a string like ‘You still need to read “The Lord of the Rings” by J.R.R. Tolkien.’
Recipe
Create an object to hold information on your favourite recipe. It should have properties for:
1. recipeTitle (a string)
2. servings (a number)
3. ingredients (an array of strings)
4. directions (a string)
Try displaying some information about your recipe.
Bonus: Create a loop to list all the ingredients.
Function
Add a function called letsCook that says “I’m hungry! Let’s cook…” with the name of your recipe title.
Call your new method.
Mean, Median, Mode
Insert a sequence of numbers separated by commas
For examples:
1,2,3,4,5,6,7,8,9
1,2,3,2,3,2,5,6,6,4,3,1,5,4,3
1,108,55,77,2,3
1,-108,55,77,2,3, 25, 108