Skip to content
Home » Program to Print “Hello” using JavaScript

Program to Print “Hello” using JavaScript

This blog post explains a simple JavaScript program that prints “Hello” as the output. It is targeted towards students and working professionals who are interested in learning the basics of JavaScript programming.

Code

console.log('Hello')

Code Explanation

The provided code snippet demonstrates how to use console.log() function in JavaScript to display the message “Hello”. The console.log() function is commonly used for printing output to the console.

Here is the code example:

javascript
console.log('Hello');

In the above code, the console.log() function is called with the argument ‘Hello’. This will print the string “Hello” to the console when the program is executed. You can try running this code in a JavaScript environment or browser console to see the output.

This program is a simple example of how to use console.log() function in JavaScript. It can be useful for beginners who are learning the basics of JavaScript programming and want to understand how to print output to the console.

Conclusion

In this blog post, we discussed a simple JavaScript program that prints “Hello” as the output using the console.log() function. This program serves as a basic introduction to JavaScript programming and demonstrates how to use console.log() function for printing output. It is a fundamental concept that every JavaScript programmer should understand.

I hope you found this blog post informative and helpful in understanding how to print output in JavaScript. Stay tuned for more programming tutorials and explanations. Happy coding!

Also checkout the following codes.


How to Implement Table Export Options using BootstrapTable Library
How to Use JavaScript’s document.getElementById() Function