compare 2 string in javascript code example Example: javascript compare strings console.log(NaN===NaN);//false