How to Compare Strings Correctly in JavaScript
A common mistake that most programmers make is trying to compare their strings with == in Java. There is a good reason why this never works, as you will find out, plus there are three prominent ways to compare strings and get true results.