michael@0: var a = Math.sin(Math.PI/2); // spec does not specify precise answer here... michael@0: if (a === 1) { // ...but if a === 1 here... michael@0: switch (a) { michael@0: case 1: break; // ...then it must also match here michael@0: default: throw "FAIL"; michael@0: } michael@0: }