We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 24cc3b1 commit f6f5ebdCopy full SHA for f6f5ebd
1185-day-of-the-week.js
@@ -0,0 +1,11 @@
1
+/**
2
+ * @param {number} day
3
+ * @param {number} month
4
+ * @param {number} year
5
+ * @return {string}
6
+ */
7
+const dayOfTheWeek = function(day, month, year) {
8
+ const weekdays = ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"];
9
+ const date = new Date(year,month-1,day).getDay();
10
+ return weekdays[date];
11
+};
0 commit comments