Learn JavaScript
Guide: How to Learn JavaScript as a Beginner: A Simple PlanA small course in 8 short lessons on the basics of JavaScript. You learn output, variables, numbers, choices with if, loops, functions, arrays and objects. Write code, run it in your browser and check your answer.
0 of 8 lessons done. Your progress is saved in this browser.
1. Say something
JavaScript is the language that makes web pages do things. console.log(...) writes something to the output below. Text goes between quotes, and a line ends with a semicolon.
Your task: Write the text Hello, world! to the output.
Output
Your code runs in your browser, in a separate worker that cannot reach this page. It is not saved or sent anywhere.
Features
- 8 short lessons, from your first line to objects
- Run your code and see the output at once
- Check my answer, a hint and the full answer for every lesson
- Your progress is remembered in this browser
How to use Learn JavaScript
- Read the lesson and the task.
- Type your answer and watch the result.
- Use the hint or the answer if you are stuck.
- Go to the next lesson.
Frequently asked questions
Is JavaScript the same as Java?
No. They are two different languages that only share part of the name. JavaScript is the language of web pages.
Is it safe to run my code here?
Your code runs in your own browser, in a separate worker that cannot reach the page. If it runs longer than 2 seconds it is stopped.
Can I change the page with this code?
Not in this course. The code can only write text to the output. Learn JavaScript: Part 2 teaches how to change a web page.
Is my code saved?
Only which lessons you finished is saved, in this browser. The code you type is not stored or sent anywhere.