Make Games with JavaScript
Code real browser games with variables, loops, canvas drawing, keys and collisions
Technology & ProgrammingVariables, functions, arrays, objects, the DOM and async code
Finish the 12 lessons (about 2 h 10 min) and pass the 20-question final exam. Your Certificate of Completion is ready the moment you pass.
JavaScript is the language of the web. It runs in every browser, powers interactive pages and web apps, and with Node.js runs servers and tools too. If you want to build websites, move into software development, automate tasks, or simply understand how the apps you use every day work, JavaScript is one of the most practical first languages you can learn.
This free course teaches the core language from zero. You will start with what JavaScript is, where it runs and how to write and run your first statements. Then you will learn to store data in variables, work with numbers, strings and booleans, and avoid the type coercion surprises that make "1" + "1" equal "11". You will make programs decide with if, else and logical operators, package logic into functions, and repeat work with loops.
The middle of the course covers the data structures real programs are built on: arrays, the map, filter and reduce methods that transform them, and objects for modeling users, products and orders. The final module connects it all to the browser: selecting and changing page elements through the DOM, responding to clicks and form input, reading error messages and debugging systematically, and loading data from web APIs with promises, async/await and fetch.
Every lesson mixes short explanations and worked examples with hands-on practice, including code challenges that run your JavaScript in the browser and check it against tests. No installation is needed. The course is for complete beginners and for people who have copied snippets before but want to really understand them. Pass the final exam to earn a free certificate of completion.
See what JavaScript is and where it runs, write your first statements, and store data in variables of different types.
Calculate with operators, avoid type coercion surprises, compare with ===, and make programs choose with if, else and logical operators.
Package logic into reusable functions with parameters and return values, then repeat work efficiently with loops.
Store lists in arrays, transform them with map, filter and reduce, and model real-world data with objects.
Use JavaScript to change web pages and respond to users, debug and handle errors, and load data asynchronously with promises and fetch.
20 questions drawn from a pool of 33. Score 70% or more to pass; retakes get a fresh set of questions.
What does this program print?
``js
console.log("2 + 3");
console.log(2 + 3);
``
Answer: C. 2 + 3, then 5
The first line logs a string, so the characters "2 + 3" are printed exactly as written. The second line has no quotes, so JavaScript evaluates the expression and prints 5. Quotes are the difference between text and code.
Yes, for most people. It runs in any browser with no installation, you see results immediately on real web pages, and it is used for front ends, back ends and tools. Its quirks, such as type coercion, are worth learning carefully, and this course points them out as you go.
They are unrelated languages with different designs and uses. The similar name came from a 1990s marketing decision. JavaScript runs in browsers and on servers through Node.js; Java is a separate language commonly used for enterprise software and Android apps.
Use const by default and let when a variable must be reassigned. Avoid var in new code: it has function scope and other behaviors that cause confusing bugs. You will still see var in older code and tutorials.
Not to learn the language itself, which is what most of this course covers. To build web pages you will want basic HTML and CSS as well, because JavaScript controls page elements that HTML defines and CSS styles.
You can learn the fundamentals in this course in a couple of hours of focused study. Becoming comfortable building small projects usually takes a few weeks of regular practice, and professional-level skill takes months of building real things.
Build small projects: a to-do list, a quiz, a weather page using a public API. Then learn more about the DOM, modules, Git, and either a front-end framework or Node.js for servers, depending on your goals.
Numbers are stored in binary floating point, which cannot represent some decimals exactly, so 0.1 + 0.2 gives 0.30000000000000004. Most languages behave the same way. Round for display with toFixed, or work in whole units such as cents for money.
Code real browser games with variables, loops, canvas drawing, keys and collisions
Technology & ProgrammingWrite real programs with variables, loops, lists, dictionaries and functions
Technology & ProgrammingWrite real programs: games, quizzes and calculators from your first line of code
Technology & ProgrammingAlgorithms, loops, if-then, variables and bug hunting, then write real JavaScript
Technology & ProgrammingTrack changes, branch safely and collaborate with pull requests
Technology & ProgrammingMatch, extract and replace text with regex in JavaScript, Python and your editor
Technology & Programming