github.com/GelenaB/friday-thirteen
Fork this repo and then git clone
your forked repo to your computer.
Once happy with your solution, git push
and submit a pull request at
github.com/GelenaB/friday-thirteen
or send an email to boldireg@tcd.ie
Friday 13th is considered as unlucky day.
Write a function called unluckyDays
that calculates how many Friday 13th are in the given year.
Your input year
will be an integer. The function should also return an integer.
Input => output
----------------------------
unluckyDays(2019) => 2
unluckyDays(1998) => 3
unluckyDays(1571) => 1
To test your solution, run npm install
in the root directory
and then run npm test
to run the automated tests.
You have 2 options to submit your solution:
- If you're working on a forked repo, push your changes to your forked repo and submit a pull request to this repo
- Send an email with your solution to
boldireg@tcd.ie
and I will confirm