Update isWeekend.md

This commit is contained in:
Isabelle Viktoria Maciohsek
2020-10-07 21:20:49 +03:00
committed by GitHub
parent 6d1bb5e8d9
commit 5169b41c1b

View File

@ -9,8 +9,8 @@ Results in a boolean representation of a specific date.
- Use `Date.getDay()` to check weekend based on the day being returned as 0 - 6 using a modulo operation then return a boolean.
```js
const isWeekend = (t = new Date()) => {
return t.getDay() % 6 === 0;
const isWeekend = (d = new Date()) => {
return d.getDay() % 6 === 0;
};
```