Re:Math and Puzzle Fans Find Magic in Martin Gardner's Legacy
by bumbledraven on Saturday November 02, 2024 @02:37AM
(#42024474)
It turns out that New Year's Day is a bit more likely to fall on Sunday than Saturday. To confirm, here's a bit of simple JavaScript that checks a complete 400-year cycle. You can run it in your browser's console:
Output:
Note: getDay() returns 0 for Sunday and 6 for Saturday (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...).
[ Parent
| on HN ]
There are no comments on this comment yet.