0

I can use the symbol @ while using \ character in C# like..

string str = @"\\190.168.0.100\New\XYZ";

Is there any corresponding character present in JavaScript ?

2
  • Why do you need to escape your string here? Commented Jun 10, 2011 at 12:38
  • @Michael Robinson because it has backslashes in it. Commented Jun 10, 2011 at 12:48

2 Answers 2

3

The only way to get a literal \ when making a literal string in JavaScript is to escape it.

var str = 'C:\\path\\to\\somewhere\\on\\windows.png';
Sign up to request clarification or add additional context in comments.

Comments

1

The \ character should work in JavaScript.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.