If the result of this code illustrates that the switch-case implies strict equality checking..
//code 1
switch(0)
{
case false: alert('NOT strict');
break;
case 0: alert('strict'); // shows up as expected
}
..then why does the result of the second one seem to tell the opposite?.. Did any type conversion occur or something?
// code 2
switch(0)
{
case 0: alert('may or may not be strict'); // I just added this case.. does it have an effect.. why?
case false: alert('NOT strict'); // this shows up!..
break;
case 0: alert('strict'); // ..instead of this!
}
note 1: My question here is not whether strict equality checking occurs or not.. I already looked up that question's answer here. My question is.. why that contradiction between the two results? Shouldn't code 2 give us 'strict' instead of 'NOT strict'?