I have a case switch statement that does not work. I checked the entry, it is valid. If the user is 1, it goes into the default value. If the user is any number, it is the default. What is wrong here? I don't know javascript at all.
switch (user) { case 1: // stuff break; case 2: // more stuff break; default: // this gets called break; }
source share