Hi @AlbertFGordon-1419
You can escape double quotes with a forward slash
Example: \"
"Then he said, \"Hello, World!\""; will print Then he said, "Hello, World!"
If this is helpful please accept answer.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
I've written a small script to decode morse code strings into regular character strings. To achieve this, I use an object that contains "name:value" pairs which are matched when iterating through the encoded string.
".-..-." is morse code for double quotes. My script works, but when I include the following "name:value" for double quotes, the output is wrong:
var mc_obj {
...
name:value pairs
...
".-..-.":'"' //<-- How do I correctly enter this value for double quote?
};
Hi @AlbertFGordon-1419
You can escape double quotes with a forward slash
Example: \"
"Then he said, \"Hello, World!\""; will print Then he said, "Hello, World!"
If this is helpful please accept answer.
JavaScript makes it easier than most languages. If I understand the question then you can just use:
'.-..-.:"'
Very simple. You probably expected it to be more complicated. I see you know you can use a single quote but it is just easier than you expected.