Learn JavaScript for Free: Beginner Course with Live Console (English and Arabic)
NeedMyTools Academy
Start free: sign in first
One free account opens every full lesson, the graded tests, your progress on any device and a certificate of completion. Sign in with an email code or Google in under a minute.
- Full lessons and exercises
- Graded tests that unlock the next lesson
- Certificate with a QR code anyone can verify
Free forever. No card, no paywall.
Already signed in? The same button opens your panel.
Just looking? Each lesson shows a short preview without an account.
JavaScript is the language that makes web pages do things. It checks a form before it is sent, updates a price as you change the quantity, opens a menu on a phone and loads fresh data without reloading the page. It is also the only language every browser runs, which is why it sits at the centre of front end work and, through Node.js, much back end work too. This course starts from zero and builds up to small working tools like the calculators on this site. Every lesson has examples you can edit and run, with a console under each result, an exercise that checks your code, and a quiz.
Quick answer
Learn JavaScript in this order: variables, values and types; operators and conditions; loops and arrays; functions; objects and JSON; then the DOM and events to change real pages; then promises, async and await, and fetch for data from the internet; then modules, modern syntax and debugging. Know basic HTML first, and some CSS helps once you start changing pages.
- Level:
- Beginner, after HTML
Lessons
- 1Variables, values and typesRun JavaScript in a page and read its output in the console · Choose between const and let, and explain why var is avoided · Work with strings, numbers and booleans, and build text with template literals · Handle decimal money values without surprise rounding errors25 min
- 2Operators and conditionsUse arithmetic operators, including % for remainders and ** for powers · Compare values safely with === and !== and explain what == does wrong · Write if, else if and else chains and short ternary expressions · Predict which values count as true or false, and choose between || and ??25 min
- 3Loops and arraysCreate arrays, read and change items by index and use length · Add, remove and find items with push, pop, includes and indexOf · Choose between for, for...of and while, and avoid endless loops · Transform and total a list with map, filter and reduce30 min
- 4FunctionsDeclare and call functions, and tell parameters from arguments · Return a result and use it, and give parameters default values · Write arrow functions and know when the short form returns by itself · Explain scope, and pass a function to another function as a callback30 min
- 5Objects and JSONCreate objects, and read, add, change and delete their properties · Choose between dot and bracket notation, and write simple methods · Work with arrays of objects, Object.entries, destructuring and ?. · Convert data to and from JSON, and handle invalid JSON safely30 min
- 6The DOM: select and change elementsExplain what the DOM is and place scripts so the elements exist · Select elements with querySelector, querySelectorAll and getElementById · Change text, attributes and classes, and know why textContent is safer than innerHTML · Create, add and remove elements to build a list from data30 min
- 7Events and formsRun code when people click, type or send a form, with addEventListener · Read values from inputs and convert them to numbers safely · Handle a form submit without a page reload and show clear error messages · Use event delegation so one listener handles a whole list35 min
- 8Promises, async and awaitPredict the order in which synchronous and delayed code runs · Read and create promises with then, catch and new Promise · Write async functions with await and handle errors with try and catch · Run independent tasks at the same time with Promise.all35 min
- 9fetch and public APIsExplain what an API, a request, a response and a status code are · Load JSON with fetch, async and await, and check response.ok · Handle network errors, bad status codes and slow servers with clear messages · Build safe URLs, send JSON with POST, and keep secret keys off the browser35 min
- 10Modules and modern syntaxSplit code into modules with named and default exports, and import them · Explain how module scripts differ from classic scripts · Read and write destructuring, default values, spread and rest · Use ?. and ?? to handle missing data, and check if a feature is safe to use35 min
- 11Errors and debuggingRead an error message and stack trace and find the line that caused it · Tell SyntaxError, ReferenceError, TypeError and RangeError apart · Use console methods, breakpoints and the debugger statement to inspect values · Throw clear errors in your own functions and follow a step-by-step debugging method35 min
- 12Project: tip and bill split calculatorPlan a small tool as inputs, rules and outputs before writing code · Read messy input safely, including Arabic digits and commas · Calculate money in whole fils and split a total fairly · Show results in English or Arabic with Intl.NumberFormat and test the finished tool50 min
NeedMyTools Academy
Sign in with a free account (email code or Google, no password) to open every lesson in full. Each lesson ends with a short test graded on our server, and the next lesson only unlocks after you pass. Pass the module tests, the final project and the final exam to get a certificate of completion with a transcript that anyone can check on this site. Without an account you can read a short preview of each lesson.
How grading works
- Each lesson: pass the exercise (checked on our server), then a 5-question test with 4 correct. The test opens after you have spent some time on the lesson.
- Three fails in a row lock that test for 30 minutes. Leaving a test unfinished counts as a fail.
- Each module ends with a 10-question test (7 to pass, 3 tries a day). The course ends with the project and a 25-question final exam (18 to pass, 3 tries a day).
- Questions are drawn at random and many have values that change for every student, so sharing answers does not help.
- The certificate says what it is: a certificate of completion for an unsupervised online assessment, not a degree or an accredited qualification.
What you will be able to do
- Read and write modern JavaScript with const, let, template literals and strict equality
- Make decisions and repeat work with conditions, loops and array methods
- Organise code into functions and objects, and change pages through the DOM
- Load data from public APIs with fetch, async and await
- Find and fix errors with the console and the browser’s debugger
Who this course is for
Anyone who can build a simple HTML page and wants it to respond to people: students, people moving into tech, office workers who want to automate small jobs, and designers who want to prototype. No maths beyond everyday arithmetic is needed. A computer with a keyboard is best for the exercises, although every example also runs on a phone.
What you will build
The course ends with a working calculator you build yourself, a currency or tip calculator that reads inputs, checks them, does the maths and shows the result in English or Arabic. Along the way, each exercise solves a small real task: an order total with VAT, delivery fee bands, a cart that adds up its items. The tasks use prices in dirhams and riyals and Gulf examples on purpose, so the skills feel useful from the first day.
How the code runs and how exercises are checked
Examples and exercises run inside a sandboxed frame on your own device, with no access to this site or your accounts, and anything they print appears in the Console box under the result. When you press "Check my code", your browser reads your script as text and looks for the technique the lesson teaches, such as "a value is declared with `const`" or "the total is built in a `for...of` loop". Your code is never run on our server, and the checks accept any names and values that do the job.
Modern JavaScript only
Many free tutorials still teach patterns from before 2015, such as `var` and loose `==` comparisons. This course teaches the language as it is written today: `const` and `let`, template literals, arrow functions, modules, and `async` and `await`, all of which work in every current browser. Where you will meet an older pattern in other people’s code, the lesson shows it and explains why the newer form is safer.
Where the facts come from
JavaScript is standardised by Ecma International as ECMAScript, and MDN Web Docs is the most trusted guide to how it works in browsers. Each lesson lists the exact pages we checked and the date we checked them. When a feature is newer and not yet in every browser, the lesson says so.
After this course
- TypeScript · LiveTypes for JavaScript: catch mistakes before the code runs.
- React · LiveBuild interfaces from components: JSX, props, state, effects and forms.
Questions about this course
Can I learn JavaScript without knowing HTML?
You can learn the language itself, but in the browser JavaScript mostly works on HTML pages, so the lessons on the DOM and events need it. A few days on the free HTML course here is enough to follow everything.
How long does it take to learn JavaScript?
The basics in this course take a few weeks at one lesson a day. Being able to build things on your own takes a few months of regular practice, so make small projects alongside the lessons rather than only reading.
Should I learn JavaScript or Python first?
If you want to build websites or web apps, start with JavaScript, because the browser runs nothing else. If you are more interested in data analysis or automation, Python is a gentle first language. The core ideas, such as variables, conditions, loops and functions, carry over from one to the other.
Is this JavaScript course free and in Arabic?
Yes. Every lesson is in English and Arabic, and the lessons, editor, console, exercises and quizzes are free. Code stays in English, as it does in real projects, while the explanations are fully translated.
Do I need to install anything to learn JavaScript?
No. A modern browser is enough, and every example runs on this page. When you start your own projects, a free editor such as Visual Studio Code and the browser’s developer tools are all you need; Node.js comes later for server-side work.
Code examples stay in English and run in a sandbox on your device. If you spot a mistake, tell us through the contact page.