If it’s more important than that between the lines, put the lines away. String comparison in JavaScript if(“text string”==”text string”) will not return true because In fact, not the strings are compared, but the addresses of those strings in memory. To…