Unlucky Years

Published by persolut in

Create a function which returns how many Friday 13ths there are in a given year.

Examples

howUnlucky(2020) ➞ 2

howUnlucky(2026) ➞ 3

howUnlucky(2016) ➞ 1

Notes

Check Resources for some helpful tutorials on the JavaScript Date object.

Watch a quick demo on how Edabit works.