JavaScript has both. In a switch statement, the comparison with the cases is via === , and a string instance is not === to a string primitive . …that will turn it back into a primitive, whereupon your switch works.
Read moreJavaScript has both. In a switch statement, the comparison with the cases is via === , and a string instance is not === to a string primitive . …that will turn it back into a primitive, whereupon your switch works.
Read more