Script element not working properly(?)
-
I am trying to learn JavaScript from the book “JavaScript for Kids” by Nick Morgan. When I try to embed JavaScript in HTML, anything inside the “script” element is not displaying anything. What is going on here? Here’s the example used in the book that I am trying to replicate:
<!DOCTYPE html>
<html>
<head>
<title>My first proper HTML page</title>
</head><body>
<h1>Hello World</h1>
<p>My first web page.</p>
<script>
var message = “Hello world!”;
console.log(message);
</script>
</body>
</html>When the program is ran, everything in the “script” element should display this:
Hello world! -
@Harlan-Nguyen said:
console.log(message);
you are using the console object which means you need to open the debugging console
from the browser you are using to see this message. -
@Eko-palypse answered your initial question, which is probably a reasonable answer.
But really, this forum is focused on the Notepad++ editor-specific aspects of using Notepad++. It’s not a general “help me debug whatever it is I am using Notepad++ to edit” forum. This is explained with the humorous example of baking cookies in this FAQ.