how 2 check for strings are equal in javascript code example Example: compare if strings are equal javascript new String("a") == new String("a")