I am trying to write the code so that if if given 2 numbers that represent my birthday (month = 11, day = 3) it would log "how did you know". anything else would return "Just Another Day". Also need the order of month and day to not matter.
I have written it as:
function birthday (month,day){
let result;
if( month == "11" && day == "3") || (day == "3" && month = "11"){
result = "How did you know?";
}
else {
result = "Just Another Day";
}
return result;
}
console.log(birthday(3, 11));
but it returns and tell me the || (or) is an unexpected token...How else could I write this?