How do I output content into the browser in quotes?

var output = "Your name is.....";
alert(output ); 

want output to be in quotes still , please help

As in;
If this is the browser …the output would be “Your name is …”

https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/basic-javascript/escaping-literal-quotes-in-strings/

3 Likes

Have tried that but its not working with just a defined var
Console.log (“output”); :confused::confused:

Have you tried escaping quotes, like:

let output = "\"Good Morning\"";
console.log(output);
2 Likes

Awww! Thanks !..didn’t think of doing it that way

1 Like