How to separate the quote symbol in a string

Hi all !

I am tryning to write the word, Don’t in a string and something is going wrong, i figured that a string already has a quote (’ ') symbol, that’s why but how to isolate this symbol in a work like [don’t] so i can write correct string?
Thanks

2 Likes

Hi.

console.log(`The following are common stock 
      words for intro texts:
      "foo", "bar", "baz". Note the surrounding tick marks`);

/*
 prints: The following are common 
 stock words for intro texts: 
 "foo", "bar", "baz". Note the surrounding tick marks
 
(note I broke the lines up so you didn't have to scroll)
*/

Welcome to the forums :slight_smile:

3 Likes

Hello! That was greatly helpful. Thanks a lot!

1 Like

Hey @iskandari

I see that you have already gotten an answer to your question. In case you are interested to read on more about other ways/solutions, here’s what I found useful: Handling text - strings in JS.

Cheers

2 Likes

Thanks Bro!
I will review it now

1 Like