Write your functions in a single file called lots-of-functions.js
Write a function called sayHi
that takes in a name string and adds "Hi, " before the name. Return the newly modified string.
Write a function called bigString
that takes in 2 strings and returns which one is bigger. If the strings are equal in size, tell the user and prints both.
Write a function called bigNumber
that takes in 2 numbers and returns which one is greater. If the numbers are equal tell the user.
Write a function called fiveMore
that takes in an array of numbers and adds 5 to each odd number then returns the updated array.
Write a function called arraySummer
that takes in an array of numbers and adds each number in the array together. Return the total.
Write a function called everyDivisible
that takes in a number n
that is less than 10 and then prints every number less than or equal to 100 that is divisible that number n
.
For example, if n = 7
Your function would print:
7
14
21
28
35
42
49
56
63
70
77
84
91
98