Tell us what’s happening:
There has to be a bug in the test cases because my code works perfectly (I tested it out on VS Code and Programmiz online compiler).
Your code so far
function oddOrEvenDay(timestamp) {
let date = new Date(timestamp).getDate();
//console.log(date)
//if(date == 26){
//date = date + 1;
//}
if(date % 2 == 0){
return "even"
} else {
return "odd"
}
}
Your browser information:
User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/144.0.0.0 Safari/537.36
Challenge Information:
Daily Coding Challenge - Odd or Even Day
https://www.freecodecamp.org/learn/daily-coding-challenge/2026-01-27