check if two strings are equal javascript code example
Example 1: compare if strings are equal javascript
new String("a").valueOf() == new String("a").valueOf()
Example 2: compare if strings are equal javascript
new String("a") == new String("a")
Example 3: string comparison in javascript
console.log("10" == "10"); //True
console.log(parseInt(10) == 10); // True Best practice