I want to represent height in this format in javascript
6\'00\"
I tried this
var height = \'6\'+\"\'\"+\'00\"\';
which work
If you surround your text with single quotes, you need to escape the inner single quote, or if you surround your text with double quotes, you need to escape the inner double quote. Here are the two flavors:
var height = '6\'00"';
Or
var height = "6'00\"";
You could also use an HTML encoded version if you'd like:
var height = '6'00"';
(JSFiddle Example)
Escape one or the other:
"6'00\""
'6\'00"'