Exercise:
The string below is broken - use escape characters to display the text correctly.
Hint
Hint: Use \
Edit This Code:
See Result »
<!DOCTYPE html> <html> <body> <p id="demo"></p> <script> document.getElementById("demo").innerHTML = "We are "Vikings"."; </script> </body> </html>
Result:
Show Answer
Correct Code:
<!DOCTYPE html> <html> <body> <p id="demo"></p> <script> document.getElementById("demo").innerHTML = "We are \"Vikings\"."; </script> </body> </html>
Correct Result:
Hide Answer
Privacy Policy