To complete this assessment, create a Github Gist for each tasks below. Once completed, please email a link for each Gist to tim@s3sleepcoach.com.
This assessment was designed to help evaluate your knowledge of the core Javascript language. Please do not use any libraries such as jQuery of Underscore.
-
Create a function called
fizzBuzzthat takes an integer (n). The function should loop over each number between 1 and n and prints "Fizz" if the number is divisible by 3, "Buzz" if the number is divisible by 5, "FizzBuzz" if the number is divisible by 3 and 5, and if the number is not divisible 3 or 5, it should print the number. -
Create a function called
flipCointhat takes no parameters and randomly returns the string 'heads' or 'tails'. Create a second function calledflipCoinResultsthat takes an integer n and runsflipCoinn times.flipCoinResultsshould return a string that represents the distribution of heads and tails for a gi