1

enter image description here

On line 11 why is there a double backward slash "\" When the end production only produces a single slash "\" I am confused as to why mountain doesn't look like this "/''''\" thanks

  • Possible duplicate of [Get backslashes inside a string - Javascript](http://stackoverflow.com/questions/10041998/get-backslashes-inside-a-string-javascript) – 4castle Feb 18 '17 at 18:06

1 Answers1

0

When you put a backward slash '\' in a string it has to be escaped with another backward slash since it is a special character in strings.

The backslash is used to for special constructs like tab: \t or newline: \n, so to just get a backslash in the string you have to do it twice.

rasmeister
  • 1,986
  • 1
  • 13
  • 19