for (var count = 1; count < 6; count++) {
switch (count) {
case (2): document.write(hi); break;
case (count > 3): document.write(bye); break;
case (count >= 4): document.write(lol); break;
}
}
Because it's not working the way I expect, not printing bye and lol, it makes me think this is invalid in JavaScript. I tried looking for some examples to see if people do this on Google, and I saw none. So is this valid or not? or Why might this not work?