Click an example to load it into the editor — then run it, tweak it, break it, fix it.
JavaScript is one of the world's most-used programming languages — it runs in every web browser. The concepts here (variables, loops, functions, arrays) apply to almost every language: Python, Java, C++, Swift.
Coding teaches structured problem-solving. Even if you never become a developer, understanding how programs work helps you automate tasks, work with data, and reason about technology.
Write a function called isEven(n) that returns true if n is even and false if it's odd. Then call it in a loop from 1 to 10 and print each result. How many lines does it take?