- Fork and clone this repository
- In the root directory of this folder, run
npm install
- Add the necessary code in
script.js
for each function - Run
npm test
to run the tests - Once the tests pass you are all done!
- Define a function called
difference
that takes two numbers as arguments and returns their difference. - Define a function called
isEqual
that 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
isEven
that 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
isDivisible
that 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
discountPercentage
that 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
isVowel
that 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
biggestOfThree
which 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: