//Questions
-
The "Greeting Machine" Write a function sayHello(n) that prints "Hello!" n times to the console.
-
The "Total Sum" Write a function sumUpTo(max) that adds all numbers from 1 to max and returns the result.
-
The "Array Lister" Write a function printList(arr) that takes an array of names and prints each one individually.
-
The "Even Only" Write a function onlyEvens() that loops from 1 to 20 and only prints the numbers that are even.
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Remainder 5. The "Reverse Countdown" Write a function blastOff(start) that counts down from the start number to 0.
-
The "Star Builder" Write a function drawStars(n) that returns a single string containing n stars (*).
-
The "Skip a Number" Write a function skipFive() that prints numbers 1 through 10, but uses an if statement to not print the number 5.
-
The "Double It" Write a function doubleArray(arr) that takes an array of numbers and prints each number multiplied by 2.
-
The "Find the Target" Write a function findCheck(arr, target) that loops through an array. If it finds the target string, it prints "Found it!".
-
The "Square Numbers" Write a function printSquares(n) that prints the square of every number from 1 up to n.