JS Conditionals - Active learning: A simple calendar

So I was doing the Simple calendar task in the end of this page:

My solution was a bit different from the one provided, but still I can’t understand what’s wrong with mine - why won’t it work.

Here’s the conditional statement snippet with my solution in it.

select.onchange = function() {
const choice = select.value;
//the code below was done by me
let days;

if (choice===‘January’ || choice===‘March’ || choice===‘May’ || choice===‘July’ || choice===‘August’ || choice===‘October’ || choice===‘December’) {
days = 31;
} else if (choice===‘April’ || choice===‘June’ || choice===‘September’ || choice===‘November’) {
days = 30;
} else if (choice===‘February’) {
days = 28;
}

//the code above was done by me

createCalendar(days, choice);
}

Hi @ebergson. I just tried your code, and it worked ok for me. I paste your code into the place where the placeholder is, then try altering the value in the select box, and the number of months change correctly depending on the monthy selected.

Are you seeing some kind of error in your browser’s JS console?