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 | OpenSkills.info
Course pathWalk it in order
Look it upDip in anytime
Go furtherLeaves this page
Don't Panic
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
- https://tc39.es/ecma262/
Supports
- ECMAScript language types, objects, execution contexts, functions, modules, and promises
- Normative semantics for declarations, operators, control flow, and errors
- https://ecma-international.org/publications-and-standards/standards/ecma-262/
Supports
- Publication dates for ECMAScript editions from 1997 onward
- Third, fifth, sixth, and annual edition milestones
- https://ecma-international.org/news/ecma-262-the-ecmascript-javascript-the-most-popular-web-scripting-standard-is-celebrating-its-20th-birthday/
Supports
- TC39 work beginning in November 1996
- First edition approval and publication in 1997
- https://tc39.es/process-document/
Supports
- Staged proposal process for evolving ECMAScript
- https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide
Supports
- Study progression across grammar, control flow, functions, collections, objects, promises, and modules
- https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Language_overview
Supports
- Dynamic multi-paradigm language model and built-in types
- Functions as callable objects and closures over surrounding scope
- Language and host boundary, runtime APIs, modules, and execution constraints
- https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Grammar_and_types
Supports
- const, let, and var declarations, scope, and hoisting
- Primitive values, literals, and type conversion
- https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Functions
Supports
- Function declarations, calls, parameters, return behavior, scope, and arrow functions
- https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Closures
Supports
- Closures retaining access to lexical environments
- https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Working_with_objects
Supports
- Object properties, computed access, methods, and object creation
- https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Inheritance_and_the_prototype_chain
Supports
- Prototype-based property lookup and inheritance
- https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Equality_comparisons_and_sameness
Supports
- Strict equality and loose equality behavior
- NaN comparison behavior
- https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Loops_and_iteration
Supports
- for-of value iteration and for-in property enumeration
- https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Control_flow_and_error_handling
Supports
- throw, try, catch, finally, and Error objects
- https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Using_promises
Supports
- Promise states, chaining, rejection handling, composition, and timing
- https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/async_function
Supports
- Async functions returning promises and await behavior
- https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules
Supports
- Import and export syntax, strict mode, evaluation, and cyclic import behavior
- Browser module loading and troubleshooting
- https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Spread_syntax
Supports
- Shallow object and array copying with spread syntax
- https://dl.acm.org/doi/10.1145/3386327
Supports
- JavaScript creation at Netscape in 1995
- Early standardization, ES3, ES5, and ECMAScript 2015 history
- https://v8.dev/blog/10-years
Supports
- V8 and Chrome launch on September 2, 2008
- First Node.js release embedding V8 in 2009
- https://github.com/sindresorhus/awesome
Supports
- Discovery of the curated Awesome JavaScript list
- https://github.com/sorrycc/awesome-javascript
Supports
- Discovery of ESLint, Prettier, Vite, pnpm, TypeScript, Playwright, and Bun
- https://eslint.org/docs/latest/use/getting-started
Supports
- Static analysis of JavaScript patterns and current configuration workflow
- https://prettier.io/docs/
Supports
- Deterministic formatting by parsing and reprinting supported source files
- https://vite.dev/guide/
Supports
- Development server and production build roles in browser projects
- https://pnpm.io/motivation
Supports
- Content-addressable dependency storage and npm-compatible package management
- https://www.typescriptlang.org/docs/handbook/typescript-from-scratch.html
Supports
- Static checking of JavaScript programs and erased types at runtime
- https://playwright.dev/docs/intro
Supports
- Browser testing across Chromium, Firefox, and WebKit
- https://nodejs.org/docs/latest/api/
Supports
- Node.js host APIs, modules, processes, files, networking, and asynchronous operations
- https://docs.deno.com/runtime/
Supports
- Deno as a JavaScript runtime with permissions and an integrated toolchain
- https://bun.com/docs/runtime
Supports
- Bun as a JavaScriptCore-based runtime with package and development tooling
- https://developer.chrome.com/docs/devtools/javascript/reference
Supports
- JavaScript breakpoints, stepping, scopes, values, and snippets in Chrome DevTools
- https://firefox-source-docs.mozilla.org/devtools-user/debugger/
Supports
- JavaScript breakpoints, stepping, watch expressions, and remote debugging in Firefox
- https://code.visualstudio.com/docs/languages/javascript
Supports
- JavaScript editing, IntelliSense, navigation, refactoring, and debugging in Visual Studio Code
- https://www.jetbrains.com/help/webstorm/javascript-specific-guidelines.html
Supports
- JavaScript project configuration, code assistance, refactoring, and debugging in WebStorm
- https://www.aikido.dev/blog/npm-debug-and-chalk-packages-compromised
Supports
- September 8, 2025 npm supply chain compromise of chalk, debug, and 16 other packages
- Combined weekly download counts and the wallet-hijacking payload mechanism
- https://v8.dev/blog/fast-properties
Supports
- Hidden classes, property shape sharing, and type pollution degrading optimized code
- https://nodejs.org/en/blog/release/v15.0.0
Supports
- Node.js 15 changing the default unhandled promise rejection mode from warn to throw
