We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents fe6da34 + 4e45355 commit d505157Copy full SHA for d505157
snippets/Basics/javascript/hello-world.js
@@ -1,6 +1,9 @@
1
-# Title: Print Hello World
2
-# Topic: Basics
3
-# Language: javascript
4
-# Example: see bottom
+// Define a simple function to encapsulate the output logic.
+function displayGreeting() {
+ // 'console.log' is the standard method for outputting messages
+ // to the console in Node.js environments or web browser consoles.
5
+ console.log("Hello, World!");
6
+}
7
-// Print Hello World - placeholder in javascript
8
+// Call the function to execute the output.
9
+displayGreeting();
0 commit comments