Slash "\" reserved symbol

Results 1 to 2 of 2

Thread: Slash "\" reserved symbol

  1. #1
    Join Date
    Dec 1969

    Default Slash "\" reserved symbol

    I know slash "\" is a reserved symbol for JS.<BR>When i assign a string with "\" to a variable, <BR>this symbol will be discarded.<BR>Is it possible to remain this symbol in the string?<BR>How?<BR>TQ

  2. #2
    Join Date
    Dec 1969

    Default RE: Slash

    \<BR><BR>"\" means "take the next character as literal". It&#039;s called an escape character.<BR><BR>So "\" says "take the next character (slash) as literal", so it doesn&#039;t interpret the second slash.<BR><BR>var myVar = "here is a \ (slash)";<BR><BR>Craig.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts