I have problem in some JavaScript that I am writing where the Switch statement does not seem to be working as expected.
switch (msg.ResultType) {
  case 0:
    $('#txtConsole').val("Some Val 0");
    break;
  case 1:
    $('#txtConsole').val("Some Val 1");
    break;
  case 2:
    $('#txtConsole').text("Some Val 2");
    break;
}
The ResultType is an integer value 0-2 and I can see that in FireBug. In all cases, the switch transfers control to the final break statement which means all the logic is completely skipped. What am I missing?