educative.io

Escaping characters such as \ in double quote strings

If I’m putting a \ inside double quotes, do I still need to escape it or is that only necessary for single quotes?

You need to escape the backslash \ inside double quotes too. For example, “Hugo’s dog”==Hugo’s dog will return true.