Skip to content

Commit d505157

Browse files
Merge pull request #71 from Sohamatic/main
Update hello-world.js
2 parents fe6da34 + 4e45355 commit d505157

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed
Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
1-
# Title: Print Hello World
2-
# Topic: Basics
3-
# Language: javascript
4-
# Example: see bottom
1+
// Define a simple function to encapsulate the output logic.
2+
function displayGreeting() {
3+
// 'console.log' is the standard method for outputting messages
4+
// to the console in Node.js environments or web browser consoles.
5+
console.log("Hello, World!");
6+
}
57

6-
// Print Hello World - placeholder in javascript
8+
// Call the function to execute the output.
9+
displayGreeting();

0 commit comments

Comments
 (0)