Hello World in JavaScript

This JavaScript Hello World example shows beginners how to output the text Hello, World! using JavaScript.

Hello World in JavaScript

Copy and paste this JavaScript Hello World example into your editor, compiler, terminal or runtime.

console.log("Hello, World!");

About this JavaScript example

Hello World programs are commonly used to confirm that a programming language environment is working correctly. This example gives you a simple starting point for JavaScript.

Back to all Hello World examples

The History of JavaScript

JavaScript was created by Brendan Eich in 1995 and quickly became the language of the web. Originally designed to add interactivity to websites, JavaScript evolved into a powerful programming language used for both front-end and back-end development. Modern frameworks and technologies have expanded its role far beyond simple browser scripts. Today JavaScript powers websites, servers, mobile applications and desktop software. Because it is supported by every major web browser, it remains one of the most widely used languages in the world. Many developers start by writing a Hello World in JavaScript example before learning about functions, events and application development. Its flexibility and huge ecosystem ensure that JavaScript remains an essential skill for modern developers.

What is JavaScript used for today?

JavaScript is used by developers, businesses, educational institutions and technology organisations around the world. Depending on the language, common use cases include web development, desktop software, automation, scientific computing, mobile applications, embedded systems, enterprise software and data processing. Understanding how JavaScript is used in the real world helps learners connect a simple Hello World in JavaScript example to practical development projects. As programmers gain experience they often move from basic output statements to working with variables, functions, classes, databases and APIs.

Why learn JavaScript?

Learning JavaScript can provide valuable insight into programming concepts, software design and problem solving. Every language has its own strengths, community and ecosystem. Some languages are known for simplicity and readability, while others are valued for performance, reliability or specialised industry use. Writing a Hello World in JavaScript program is often the first milestone on a longer learning journey. By understanding the syntax, history and modern applications of JavaScript, developers can build a strong foundation before moving on to more advanced topics and larger software projects.

Explore more Hello World examples

Continue learning with more beginner-friendly Hello World examples in other programming languages.