How do I set a \ as a string in JavaScript I am using it like this
Var x = {"\":"some value"}
But it's says that that is illegal, so then I tried it like '\' this but still the same error happened.
How do I set a \ as a string in JavaScript I am using it like this
Var x = {"\":"some value"}
But it's says that that is illegal, so then I tried it like '\' this but still the same error happened.
You can use escaping characters so add one more \ it will be escaped and become a string like this var x = {"\\":"some value"}