This site is mobile accessible. Press the "Tap Here" button to use a smaller font-size.
Smartphone icons created by Freepik - Flaticon
Strings and objects cannot be safely compared.
let x = "John"; // x is a string let y = new String("John"); // y is an object document.getElementById("demo").innerHTML = (x===y);
Data types: string object not the same data type