Getting started with JavaScript

Where JavaScript runs, and your first lines of code.

JavaScript runs in every browser and, through Node.js, on servers too. HTML is the structure, CSS is the look, and JavaScript is the behaviour.

Press Run, then change the text and run it again.

Expected output
Vanakkam, Erode!
5

On a real page, put your code in a file and load it at the end of the body, or use the defer attribute in the head.

HTML
<script src="app.js" defer></script>
Variables and types โ†’