Q:

Cannot split with " \ " in js

i am trying to split my data using .split('\'), but its not working an error occurs "Uncaught SyntaxError: Invalid or unexpected token".
can we split with '\'?

A:

You should just split on a String here because you need to escape the \ (String -> double quotes).
So .split("\\") it is.

