Declaring Strings with Quotes Inside

Let's follow the steps:

  • Declare a variable named message with the value I'm learning JavaScript!.

    const message = "I'm learning JavaScript!";
    
  • Declare a variable named quote with the value He said, "JavaScript is fun!".

    const quote = 'He said, "JavaScript is fun!"';
    
  • Print the values of message and quote to the console.

    console.log(message);
    console.log(quote);
    

Putting it all together:

const message = "I'm learning JavaScript!";
const quote = 'He said, "JavaScript is fun!"';
console.log(message);
console.log(quote);