display month friday 13th javascript year

Solutions on MaxInterview for display month friday 13th javascript year by the best coders in the world

showing results for - "display month friday 13th javascript year"
Bunty
23 Jul 2017
1 function numberOfFridaythe13thsIn(jahr) {
2            var counter = 0;
3            for (i = 1; i <= 12; i++) {
4                var d = new Date(i + "/13/" + jahr);                          
5                if (d.getDay() == 5) {
6                    counter++;
7                }
8            }
9            return counter;
10
11        }
12