Switch Case question - Code error
Hey, I just tried to solve a sololearn question but it won't work. I need to to several cases for giving out some text. If I don't change the first sentence given by sololearn (you can see them I commented it) then I get a massive error Message, so I changed it to just readline (). Now I got the problem, that It show no output. So for example if sololearn types in 1 it shows no output. Could you explain to me my error? function main() { var themeNumber = readLine() // var themeNumber = parseInt(readLine(), 10) /* 1 - Light 2 - Dark 3 - Nocturne 4 - Terminal 5 - Indigo */ // Your code here switch (themeNumber) { case 1: document.write("Light"); break; case 2: document.write("Dark"); break; case 3: document.write("Nocturne"); break; case 4: document.write("Terminal"); break; case 5: document.write("Indigo"); } }