
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Strict Comparison in JavaScript Switch Statement
To get out of the confusion regarding strict comparison, try to run the following code snippet in JavaScript −
Example
switch(1) { case '1': alert('Switch comparison: Not Strict.'); break; case 1: alert('Switch comparison: Strict.'); break; default: alert(‘Default’); }
Advertisements