JS
Hello World
javascript · easy
EasySolved
Exercism's classic introductory exercise. Just say "Hello, World!".
Status
solved
Difficulty
easy
Date
August 31, 2026
Solved
Yes
Instructions
Hello World
Welcome to Hello World on Exercism's JavaScript Track.
If you need help running the tests or submitting your code, check out HELP.md.
Instructions
The classical introductory exercise.
Just say "Hello, World!".
<a href="https://en.wikipedia.org/wiki/%22Hello,_world!%22_program" target="_blank" rel="noopener noreferrer">"Hello, World!"</a> is the traditional first program for beginning programming in a new language or environment.
The objectives are simple:
- Modify the provided code so that it produces the string "Hello, World!".
- Run the test suite and make sure that it succeeds.
- Submit your solution and check it at the website.
If everything goes well, you will be ready to fetch your first real exercise.
Solution
hello-world.jsjavascript
//
//This is only a SKELETON file for the 'Hello World' exercise.
// It's been provided as a
// convenience to get you started writing code faster.
//
export function hello() {
return 'Hello, World!';
}
Tests
1 file
hello-world.spec.jsjavascript
import { describe, expect, test } from '@jest/globals';
import { hello } from './hello-world';
describe('Hello World', () => {
test('Say Hi!', () => {
expect(hello()).toEqual('Hello, World!');
});
});