EXERCISES:
-
INTRO: Create an array of String datatypes with length 5 & write a function to console.log each item in the array.
INTERMEDIATE: Using the same array, write a function that loops through the array in reverse and logs each item in the array
ADVANCED: Using the same array, write a function with an if/else statement that returns an array of just the odd index values
-
INTRO: Create an object with properties name, age, hometown and give them values
INTERMEDIATE: Create an array of objects with the above properties and write a function that creates an array of just the names
ADVANCED: Create an array of objects with the above properties and return an array of just the objects with an age between 20 and 45;
-
let x = 7; let y = 10;
INTRO: Write two statements using javascript operators that results in a true evaluation
INTERMEDIATE: Write an and statement or an or statement using javascript operators that results in a true evaluation
ADVANCED: Write a function that takes arguments x and y that creates an array of all of the numbers between x and y
- let nemoArray = ['Nemo', 'Dory', 'Peach', 'Pearl', 'Sheldon', 'Crush'];
INTRO: Write a function to return an array of the total length of each word in the nemo array
INTERMEDIATE: Write a function that creates a new array of all of the names that start with 'P';
ADVANCED: Use the javascript sort method to return the array in alphabetical order