- Fork and clone this repository
- In the root directory of this folder, run
npm install - Add the necessary code in
script.jsfor each function - Run
npm testto run the tests - Once the tests pass you are all done!
- Define a function called
sumthat takes two numbers as arguments and returns their sum. - Define a function called
isEqualthat takes two arguments and returns a boolean. Return true if the two arguments are equal and return false if they are not. - Define a function called
isEventhat takes an arbitrary whole number as an argument and return a boolean. Return true if the number is even and false if it is not. - Define a function called
isDivisiblethat takes two arguments and returns a boolean. Return true if the first argument is divisible by the second; otherwise, return false. - Define a function called
discountPercentagethat returns the total discount ($), given the original amount and discount percentage (as arguments). Return a warning that says "please enter a number between 0 and 100" if the discount amount is greater than 100 or less that 0 percent. - Define a function called
isVowelthat takes a letter and returns true if the letter is a vowel, and false if the letter is a consonant. (Treat 'y' as a consonant) - Write code that converts a temperature in Celsius to Fahrenheit.
- Define a function called
biggestOfThreewhich takes three numbers as arguments, and returns the largest one. - Bonus: Write a function that will estimate your federal income taxes. The function should take just one input: your salary (or future salary, once you graduate!). The link below has information on how federal income taxes are calculated: