openskills.info
JavaScript Fundamentals logoOpen Course

JavaScript Fundamentals

JavaScript is a programming language used to make web pages interactive and to build applications in browsers, servers, and other runtimes. A host supplies capabilities such as the DOM, files, or networking around the core language.

itProgramming languages

Don't Panic — JavaScript Fundamentals

JavaScript is the language your browser already speaks, and now your server, your command line, and a surprising number of desktop apps speak it too. It defines values, functions, objects, and a handful of asynchronous primitives — nothing more than that. Everything that touches the outside world, from reading a file to showing a button, comes from something else entirely.

That something else is a host: a browser, Node.js, Deno, or Bun, each wrapping the same language in a different set of capabilities. Before JavaScript existed, a page that needed to change had to ask the server for an entirely new one — every click, a round trip. JavaScript let a page update itself without leaving the browser, and that idea later spread to servers and command-line tools too. The language kept its shape; the places willing to run it multiplied.

Start with the closure, because most of what looks like JavaScript magic is one. A function keeps access to the variables that existed around it when it was created, not just the ones present while it happens to be running. That single mechanism is behind private state, callbacks, and half the patterns you will meet in real code.

The second load-bearing idea explains bugs that feel like nothing happened. Objects are held by reference, so two variables can point at the exact same object, and a change made through one shows up through the other. Copying with spread syntax only protects the outer layer; anything nested is still shared. When state changes somewhere you never touched, this is usually why.

The third idea is that most real JavaScript work is asynchronous: a promise stands in for a result that is not ready yet, and await pauses only the function that used it, never the whole program. Two functions that read top to bottom can still finish in a different order at runtime, because "later" is not the same moment for both of them.

Here is where people get bitten. const does not mean the data can never change — it means the binding cannot be pointed at something else; the object sitting inside a const array or object is exactly as mutable as it ever was. A related trap: items.forEach(async item => await doSomething(item)) looks like it waits for each item, and it does not. forEach starts every iteration immediately and ignores the promises entirely, with nothing thrown to flag the mistake.

Everything past this tab narrows in on one piece of that picture. Read the intro for the full execution model and the language/host boundary, properly explained. Use the slides for the relationships as a map instead of paragraphs. Keep the cheatsheet nearby once you already know roughly what you are checking. Field notes, when this course ships one, is where the judgment calls live: what teams get wrong, and why it keeps happening.

Where this skill leads

Relevant careers

See how this topic contributes to broader role-level skill maps.

Sources