
Understand how JavaScript works under the hood, embracing its odd yet powerful nature, and learn to think like a true JavaScript programmer beyond imitation.
Set up for this course by installing Google Chrome and Brackets, then use Chrome's developer tools and Brackets' built-in server to write and run JavaScript in the browser.
Demystify JavaScript vocabulary with big word alerts that define terms, reveal simple definitions, and explore under-the-hood concepts without intimidation throughout this course.
Master deep JavaScript by understanding how the language and browser work, and explore frameworks like jQuery and AngularJS and the weird parts to write robust code.
Explore syntax parsers, lexical environments, and execution contexts as core concepts in JavaScript, revealing how code is parsed, organized, and executed behind the scenes.
Explore name/value pairs and how JavaScript objects are nested collections of these pairs, where a name maps to a value, and values can be other objects.
Examine the global environment, global object, and execution context in JavaScript, showing how code at the global level attaches to the window object and how this relates to it.
Discover how JavaScript creates an execution context through a creation phase and hoisting, revealing how variables become undefined and functions preexist in memory.
Explore how JavaScript initializes variables to undefined during execution context creation, distinguish undefined from not defined, and see how var and hoisting influence debugging and runtime behavior.
Discover how the JavaScript execution context uses a creation phase to set up memory, variables, and functions, then an execution phase that runs code line by line.
Explore how JavaScript runs with single threaded, synchronous execution, processing one command at a time in the order it appears.
Explore how function invocation creates a new execution context on the execution stack, with each call pushing and popping contexts, while the global context initializes and runs synchronously.
Explore how functions create separate execution contexts and variable environments, showing scope and the execution stack, and why myVar differs across global, A, and B with undefined results.
Explore how the scope chain resolves variables across execution contexts by lexical environment and outer references, revealing how b, a, and global scopes determine myVar.
Explore how scope defines where a variable is available across execution context and lexical environment. See how ES6 'let' enables block scoping inside blocks and loops, while var remains available.
Learn how asynchronous callbacks work in a synchronous JavaScript engine, using the execution stack, event queue, and event loop to handle browser events and long-running tasks.
Explore dynamic typing in JavaScript and compare it to static typing in Java or C#. The engine determines types at runtime, letting values change types during execution.
Explore the six primitive types in JavaScript—undefined, null, boolean, number, string, and symbol—along with how dynamic typing treats single values and the differences between undefined and null.
Operators act as special infix functions in JavaScript, illustrated by 3 + 4, where the plus operator returns a value. The engine uses dynamic typing to influence operator behavior.
Understand operator precedence and associativity in JavaScript, where higher precedence calls first and 3 + 4 * 5 yields 23, while parentheses yield 35.
Discover how coercion in JavaScript, a dynamically typed language, converts values between types behind the scenes, causing the plus operator to produce 12 when given a number and a string.
Explore how comparison operators, precedence, and coercion in JavaScript produce surprising results, then learn the difference between double equals, triple equals, and the purpose of Object.is.
Explore how JavaScript coerces values to booleans, turning undefined, null, and empty strings to false, and learn to check existence with if statements.
Use the or operator to set default parameter values in greet(name) with name = name || 'Your name here'. Note how undefined and zero affect the defaults.
Explore how default values interact with the global execution context to prevent library collisions in frameworks and libraries, and learn how code is guarded on the window object.
Explore how in JavaScript objects and functions are intertwined, with objects as memory-resident collections of properties. Prefer the dot operator for readability; use brackets only for dynamic names.
Explore object literals as the preferred, fast shorthand for creating objects with curly braces and name:value pairs, including nested objects, and see how they integrate with functions and dot notation.
Learn how to fake namespaces in JavaScript by using object literals as containers to prevent global name collisions, with examples like English and Spanish.
Clarify the difference between JSON and JavaScript object literals, noting that JSON is a string format with quoted property names, and show how JSON.stringify and JSON.parse convert between the two.
Discover first class functions, where functions are objects with a code property and a name, enabling attaching properties, passing as parameters, and creating functions on the fly.
Explore how JavaScript treats functions as objects, compare function statements and function expressions, and see hoisting, anonymous functions, and first class functions enabling passing functions to others.
Explore by value vs by reference in JavaScript, comparing primitives and objects, showing how primitives copy values while objects share a memory address, leading to shared mutations.
Explore how execution contexts define this in JavaScript. See how this points to the global object for calls, to the containing object for methods, and how self preserves the reference.
Explore how JavaScript arrays hold values of any type—from numbers and booleans to objects and even functions—and how to access and invoke them via zero-based indexing.
Learn how the arguments keyword exposes function parameters, how it behaves as array-like, and how spread will collect extra parameters into an array, with notes on hoisting and defaults.
Explore how JavaScript uses first-class functions to replace overloading. Observe how default parameters and wrapper functions like greetEnglish and greetSpanish simplify calls while sharing a single core greet function.
See how the syntax parser inside the JavaScript engine reads code character by character to validate syntax, infer intent, and sometimes alter code before execution.
Uncover how automatic semicolon insertion in JavaScript can produce undefined returns with object literals, and why you should always use semicolons.
Explore how whitespace and comments in JavaScript influence readability; learn to use spaces, tabs, and line breaks to clarify code while the parser ignores them.
Explore immediately invoked function expressions (IIFEs) and learn how wrapping a function in parentheses creates a function object that runs instantly after creation.
Explore immediately invoked function expressions (IIFEs) to create isolated execution contexts, prevent global collisions, and safely access the global object by passing it as a parameter.
Explore closures in JavaScript by returning a function from greet and capturing whattosay via the scope chain. See how outer variables persist through memory and execution contexts, enabling powerful patterns.
Understand how closures capture outer variables and why each function in an array logs the same value, and learn how to use IIFE or let to preserve distinct values.
Discover function factories in JavaScript by returning closures from a creator function. Each call creates a new execution context, trapping language and producing customized greetings.
Explore closures and callbacks in JavaScript, using function expressions and first-class functions with setTimeout, and see how asynchronous execution preserves access via the event loop.
Discover how call, apply, and bind control the this value and arguments in JavaScript, with examples of function borrowing and currying for flexible function invocation.
Explore functional programming in JavaScript by using first-class functions, passing and returning function objects, and building reusable mapForEach that maps arrays to new results with minimal, non-mutating code.
Explore underscore.js and lodash to learn functional programming concepts, read annotated source code, and practice first-class functions to write cleaner, reusable JavaScript.
Explore how JavaScript uses prototypal inheritance to share properties and methods between objects, contrasting it with classical inheritance and highlighting its flexibility and ease of understanding.
Explore prototypal inheritance and the prototype chain in JavaScript, showing how the dot operator searches through prototypes and how this refers to the calling object.
Explore how every non-primitive in JavaScript has a prototype, from objects and arrays to functions, and trace the prototype chain to the base object.
Explore reflection in JavaScript to inspect and extend objects by listing properties, using for-in and hasOwnProperty. See how Underscore's extend composes objects by copying properties and methods onto an object.
Explore function constructors and the new operator to build objects in JavaScript, learn how this points to a new object, and set prototypes for shared properties.
Learn how function constructors set up object prototypes in JavaScript, using the new operator and prototype chain to share methods and save memory.
This aside explains how the new operator turns function constructors into objects, the risk of omitting new, and the capitalized naming convention that signals constructors; linters help, legacy patterns persist.
Understand built-in function constructors in JavaScript, how new creates objects, and how string.prototype and number.prototype expose methods through prototypal inheritance. Note boxing of primitives and caution against unsafe modifications.
Avoid built-in function constructors for primitives; understand that == coerces a primitive and an object, yielding true, while === compares types and yields false. Use literals, and moment.js for dates.
Explore how JavaScript arrays are objects with keys like 0, 1, and 2, and why for..in can reach prototype properties, so use length with a standard for loop.
Learn pure prototypal inheritance with Object.create, mutate prototypes, and use polyfills to support older browsers, avoiding classical class concepts.
See how ES6 introduces classes as a syntax for creating objects with constructors and prototypes, using extends and super, while still relying on prototypal inheritance under the hood.
Use object and array literals to initialize data, including a two-person people array with addresses and a greet method. Avoid syntax errors and prototype data before connecting to an api.
Explore how typeof and instanceof reveal dynamic typing in JavaScript, identifying primitives like number and string, objects and arrays, and edge cases undefined, null, functions, and prototype chain concepts.
Opt into strict mode to enforce stricter JavaScript rules and catch undeclared variables like persom before runtime errors. Place 'use strict' at the top of a file or function.
Learn from others' good code by exploring open source JavaScript projects on GitHub, reading uncompressed source files, and studying structure of frameworks like Angular, Backbone, Ember, Knockout, React, and jQuery.
Explore how jQuery simplifies DOM manipulation and cross-browser quirks by reading its unminified source, including the immediately invoked function expression, global exposure, and the extend pattern on the prototype.
Learn how jQuery extends itself with utilities like isArray and isNumeric, and how it embeds the Sizzle engine for CSS selection, plus the init prototype pattern.
Explore how jQuery enables method chaining and prototype-based design by examining addClass. See how the $ alias and window exposure create the global jQuery object and enable chainable methods.
Design and implement greetr, a framework that generates greetings in English and Spanish. Use a first and last name with an optional language, and fill an html element via jQuery.
Create a reusable greeter framework inside an immediately invoked function to establish a safe execution context, expose only what’s needed on the global window, and structure code with jQuery.
Learn to build a jQuery-like Greetr object with a self-contained init constructor, expose it globally as Greetr and G$, and define a prototype for reusable methods.
Explore creating a JavaScript greeter with private properties via closures, sharing methods on the prototype, and building a chainable API (greet, setLang) with validation and logging.
Add a jQuery-supporting method to the greeting prototype that accepts a selector and a formal flag, uses jQuery to update the target with a language-based greeting, and supports chaining.
Good commenting clarifies JavaScript's terse syntax by explaining intent for yourself and future coders. The lecture shows adding comments to a mini library and validating object creation.
Build and use a mini framework on a webpage with jQuery, enabling chainable methods to set language, update a greeting, and log output to the console.
Encourage learners to leave a review by tapping the top right corner and selecting a star rating or adding comments.
Explore transpiled languages like TypeScript and ES6, learn how transpilers convert code into standard JavaScript and why typing and modern syntax matter for long-term projects.
JavaScript is the language that modern developers need to know, and know well. Truly knowing JavaScript will get you a job, and enable you to build quality web and server applications.
Over the past decade, tens of thousands of developers count this course as the course they always go back to year after year -- the one that finally helped them grasp JavaScript and move to the next level in their web development career. Many students are now senior developers, business owners, managers, and educators!
In this course you will gain a deep understanding of JavaScript, learn how JavaScript works under the hood, and how that knowledge helps you avoid common pitfalls and drastically improve your ability to debug problems. You will find clarity in the parts that others, even experienced coders, may find weird, odd, and at times incomprehensible. You'll learn the beauty and deceptive power of this language that is at the forefront of modern software development today.
This is the original course that taught web developers the concepts of the execution context and execution stack, critical concepts to mentally grasp how JavaScript works and how you code in it.
This course will cover such advanced concepts as objects and object literals, function expressions, function objects, prototypical inheritance, functional programming, scope chains, block scoping, classes, immediately invoked function expressions (IIFEs), call, apply, bind, promises, async, await and more.
We'll take a deep dive into the source code of popular frameworks to see how you can use your understanding of JavaScript to learn (and borrow) from other's good code.
Finally, you'll learn the foundations of how to build your own JavaScript framework or library.
What you'll learn in this course will make you a better JavaScript developer, and improve your abilities in React, Node.js, Next.js, Angular, Vue, MongoDB, and all other Javascript-based technologies!
Learn to love JavaScript, and code in it well.
Note: In this course you'll also get downloadable source code. You will often be provided with 'starter' code, giving you the base for you to start writing your code, and 'finished' code to compare your code to.