JavaScript Tutorial

The language of the browser. Modern syntax only — const and arrow functions, not the var-era tutorials still floating about.

Lessons:4Reading time:19 minCost:Free, no sign-up

What this covers

JavaScript is the only language a browser runs, which makes it unavoidable if you want to build anything people open on a screen. It is also the language with the most out-of-date tutorials on the internet, written when var was normal and jQuery was the answer to everything.

These lessons are the modern version. const and let, arrow functions, the array methods that replace most loops, and the DOM work that makes a page do something. Every one carries the mistake we see in class — const not meaning what people think it means, sort() putting 100 before 9, a script that silently does nothing because it ran before the page existed.

You do not need to have learnt another language first. If you have, the syntax will look familiar and the surprises will not be where you expect them.

After these lessons you can

  • Write modern JavaScript without var, and know why that matters
  • Replace most for loops with map, filter, find and reduce
  • Tell which array methods change the original and which return a copy
  • Select, change and listen to elements on a page without a framework
  • Debug the two problems that make a script look completely dead

Where JavaScript is actually used

Including the part most course pages leave out: what it is the wrong tool for.

Everything in a browser

Every interaction on every website you use. There is no alternative — this is the only language that runs there.

React, Next.js and the rest

Frameworks are JavaScript with rules. Learning React before JavaScript is why so many people can build a component and cannot fix one.

Servers, with Node

The same language on the back end, which is why full stack in one language is possible at all.

Not for

Heavy data work and machine learning. It can be done; it is not where the libraries or the jobs are. That is Python.

Before you start

Should I learn JavaScript or React first?

JavaScript, and it is not close. React assumes you already understand functions, arrays and objects. People who skip ahead can follow a tutorial and then cannot debug their own component, because the bug is in the language, not the framework.

Is JavaScript still worth learning with AI writing code?

AI writes components quickly and gets the details wrong — focus order, contrast, what happens at 320 pixels wide. Knowing which output to reject is the job now, and you cannot reject what you cannot read.

Do I need to learn TypeScript too?

Eventually, yes — most professional codebases use it, this website included. Not at the start. TypeScript is a layer on top of JavaScript, and learning both at once means you cannot tell which one is causing the error.

What can I build after these lessons?

A page that responds to what someone does: a form that validates, a filter on a list, a small interactive widget. Not an application yet — that needs a framework, a server and a database, which is what the course covers.

Learn JavaScript with someone in the room

These pages explain the idea. The hard part is the hour where your own code will not run and you cannot see why — and that is the part a class is for. WebPrims is on Majitha Road, Amritsar. Come and sit one before you pay anything.