Instructions: with your partner, take 5 minutes to review these exercises, and make a list of things you don't understand that we still need to review to get the exercises completed, and we'll go over them.
- Define a function
maxOfTwoNumbers
that takes two numbers as arguments and returns the largest of them. Use the if-then-else construct available in Javascript. You'll have to remember your pre-work, or do some googling to figure this out. - Define a function
maxOfThree
that takes three numbers as arguments and returns the largest of them. - Write a function that takes a character (i.e. a string of length 1) and returns true if it is a vowel, false otherwise.
- Define a function
sumArray
and a functionmultiplyArray
that sums and multiplies (respectively) all the numbers in an array of numbers. For example,sumArray([1,2,3,4])
should return 10, andmultiplyArray([1,2,3,4])
should return 24.
- Define a function
reverseString
that computes the reversal of a string. For example, reverseString("jag testar") should return the string "ratset gaj". - Write a function
findLongestWord
that takes an array of words and returns the length of the longest one. - Write a function
filterLongWords
that takes an array of words and an numberi
and returns the array of words that are longer than i.