// The language of the web.
JAVASCRIPT POWERS THE INTERNET.
From dynamic websites to server applications, mobile apps to AI tools, JavaScript runs everywhere. It's the only language that runs natively in browsers and has become the universal runtime for modern development.
WHY JAVASCRIPT?
JavaScript is the backbone of web development. With Node.js, it powers servers. With React, Vue, and Angular, it builds UIs. With TensorFlow.js, it runs AI in browsers. Learn once, build everywhere.
BECOME A JAVASCRIPTER.
Master variables, functions, objects, async programming, and modern ES6+ features. Join the millions of developers who make the web come alive.
12 lessons. Complete JavaScript control.
Add interactivity to web pages
BeginnerStore values with let, const, and var
BeginnerCompare values and make decisions
BeginnerReusable blocks of code with parameters
BeginnerStore collections of data
IntermediateSelect and modify HTML elements
IntermediatePromises, async/await, and callbacks
IntermediateArrow functions, destructuring, modules.
IntermediateTry/catch and debugging techniques.
IntermediateFetch data from web services.
AdvancedlocalStorage, sessionStorage, cookies.
AdvancedNPM, Webpack, TypeScript basics.
AdvancedJavaScript was created by Brendan Eich in 1995 in just 10 days. Originally a simple scripting language for browsers, it has evolved into the most versatile programming language in existence.
Today, JavaScript runs on every website you visit, powers servers with Node.js, builds mobile apps with React Native and Cordova, creates desktop apps with Electron, and even powers IoT devices.
The npm registry hosts over 2 million packages—the largest ecosystem of any programming language. Whatever you want to build, JavaScript has the tools.
The future of development is JavaScript. Own it.
JavaScript is a high-level, interpreted programming language that conforms to the ECMAScript specification. It was created in 1995 by Brendan Eich in just 10 days.
1. JavaScript was created by _____ in 1995.
Hint: Netscape engineer
2. JavaScript conforms to _____ specification.
Hint: ES for short
3. Use _____ to output to console.
Hint: Print function
4. Node.js uses Google
Hint: JavaScript engine
5. In browser, JS goes in _____ tags.
Hint: HTML tag
6. JavaScript is _____ typed.
Hint: No declaration needed
7. NPM stands for Node _____ Manager.
Hint: Manages packages
8. JS runs on every _____.
Hint: Where web runs
Variables store data values. JavaScript has three ways to declare variables.
1. Use _____ for constants that won
Hint: Not let or var
2. let is _____ scoped.
Hint: Scope type
3. typeof null returns _____.
Hint: JS quirk
4. parseInt converts to _____.
Hint: Whole number
5. Template literals use _____.
Hint: ` `
6. Empty string is _____ in boolean.
Hint: Falsy value
7. null represents _____ value.
Hint: On purpose
8. typeof returns a _____.
Hint: Type name
1. === is a _____ comparison.
Hint: No type coercion
2. % returns the _____.
Hint: Division leftover
3. Ternary uses _____ and :
Hint: Question mark
4. || returns first _____ value.
Hint: True-like
5. ! converts to _____.
Hint: True/false
6. switch needs _____ to stop.
Hint: Exit keyword
7. Loose equality is _____.
Hint: Two equals
8. ** is _____ operator.
Hint: Power
Functions are reusable blocks of code.
1. Arrow functions use _____ syntax.
Hint: Fat arrow
2. ...numbers is a _____ parameter.
Hint: Collects args
3. map returns a new _____.
Hint: List
4. filter keeps elements that _____.
Hint: Are true
5. reduce produces a _____ value.
Hint: One value
6. Functions can accept _____.
Hint: Functions as args
7. Default params use _____.
Hint: Assignment
8. function is a function _____.
Hint: Type
Arrays store ordered collections of values. They're fundamental for data manipulation in JavaScript.
Modern JavaScript provides powerful array methods for data transformation.
Destructuring provides a concise way to extract values from arrays.
array.filter().map().sort()
Objects store key-value pairs and form the foundation of JavaScript's object-oriented capabilities.
The spread operator (...) expands arrays and objects into individual elements.
1. map() returns a new _____.
Hint: List type
2. filter() keeps elements that _____.
Hint: Pass the test
3. Destructuring uses _____ brackets for arrays.
Hint: [ ]
4. Spread operator uses _____ dots.
Hint: ...
The DOM (Document Object Model) represents the page structure. JavaScript can select and manipulate any element.
Events allow your code to respond to user interactions.
1. querySelector returns the _____ match.
Hint: Single element
2. addEventListener takes _____ parameters.
Hint: Event and callback
3. preventDefault stops _____ behavior.
Hint: Browser default
4. textContent is _____ than innerHTML.
Hint: No XSS risk
Callbacks are functions passed as arguments to other functions, executed after an operation completes.
Promises represent values that may not exist yet but will be resolved at some point in the future.
Async/await is syntactic sugar over promises, making asynchronous code look synchronous.
The Fetch API provides a modern way to make HTTP requests.
Execute multiple promises in parallel and wait for all to complete.
1. Promises have _____ states.
Hint: Pending, fulfilled, rejected
2. await can only be used in _____ functions.
Hint: Async keyword
3. Promise.all waits for _____ to complete.
Hint: Every promise
4. fetch returns a _____.
Hint: Async result
Arrow functions provide a concise syntax and lexically bind the 'this' value.
Template literals allow embedded expressions and multi-line strings using backticks.
ES6 introduced block-scoped variable declarations, replacing the function-scoped 'var'.
ES modules allow you to split code into separate files for better organization.
ES6 classes provide syntactic sugar over JavaScript's prototype-based inheritance.
1. Arrow functions use _____ syntax.
Hint: Fat arrow
2. Template literals use _____ quotes.
Hint: ` `
3. const cannot be _____.
Hint: Changed
4. super() calls the _____ constructor.
Hint: Base class
Try/catch blocks allow you to handle errors gracefully without crashing your application.
The finally block always executes, whether an error occurred or not.
You can throw custom errors to handle exceptional conditions in your code.
Stack traces show the sequence of function calls that led to an error.
1. try block contains _____ code.
Hint: May throw errors
2. finally runs _____.
Hint: Every time
3. TypeError is for wrong _____.
Hint: Data type
4. error.stack shows the _____.
Hint: Call sequence
REST (Representational State Transfer) APIs use HTTP methods to perform CRUD operations on resources.
JSON (JavaScript Object Notation) is the standard data format for APIs.
Axios is a popular HTTP client with a cleaner API than fetch.
1. POST is used to _____ data.
Hint: Add new
2. JSON.stringify converts to _____.
Hint: Text format
3. 404 status means _____.
Hint: Missing resource
4. JWT stands for JSON Web _____.
Hint: Auth token
LocalStorage stores data persistently with no expiration time. Data survives browser restarts.
SessionStorage is similar to LocalStorage but data is cleared when the page session ends.
Cookies are small pieces of data stored by the browser, automatically sent with HTTP requests.
IndexedDB is a low-level API for client-side storage of structured data including files/blobs.
1. LocalStorage stores only _____.
Hint: Text data
2. SessionStorage clears on _____.
Hint: Tab close
3. Cookies are sent with _____ requests.
Hint: Network
4. IndexedDB is for _____ data.
Hint: Complex objects
NPM is the world's largest software registry, hosting over 2 million packages.
Build tools bundle, optimize, and transform your code for production.
Babel converts modern JavaScript (ES6+) into backward-compatible versions for older browsers.
TypeScript adds static typing to JavaScript, catching errors at compile time.
1. NPM manages _____.
Hint: Dependencies
2. Vite is a _____ tool.
Hint: Bundle code
3. TypeScript adds _____ typing.
Hint: Compile-time checks
4. Babel is a _____.
Hint: Code converter