
This course includes our updated coding exercises so you can practice your skills as you learn.
See a demo
A Note About Sample Files
As you move through this course, many lectures allow you to follow along. Those lectures contain a downloadable zip file. Inside the zip file you will find a folder with a name that includes start and a folder with a name that includes final. Use the files in the start folder as you begin the lecture. If you would like to open the final version of the files, use the final folder.
Discover where JavaScript can take you by leveraging its ubiquity, speed, and flexibility, and learn advanced object and function concepts to structure complex tasks across paradigms.
Research JavaScript libraries and frameworks to speed project work while maintaining mastery of pure JavaScript. Use javascripting.com and GitHub to evaluate options and learn how React and others fit in.
Discover how JavaScript treats first class functions as values, enabling assignment to variables and passing by reference. See a run function executing sum and an anonymous function that multiplies them.
Learn four ways to invoke JavaScript functions—as a function, as a method, as a constructor with new, or with call and apply—and how this and arguments affect context.
Create JavaScript objects using the object literal or the constructor with new, define properties and methods, access them with the dot operator, and manage properties with delete, in, and hasOwnProperty.
Examine how normal function invocation binds this to the global object, with this.name showing the global variable, and demonstrate this behavior using first-class functions, return values, and function passing.
In normal function invocation under strict mode, this binds to undefined rather than the global object, causing errors like cannot read property name of undefined.
Explore how function prototypes define shared properties, how the prototype links to a function, and how apply, bind, and call explicitly bind this during execution.
Explore how arrow functions offer minimal syntax and lexical this to solve this-binding issues in callbacks, with practical examples of syntax, parameters, and implicit returns.
Review how invoking functions in JavaScript determines this: regular calls, methods, constructors, and indirect binding with call, apply, bind, arrow functions, including global object, undefined, and strict mode.
This lesson demonstrates event bubbling by attaching a double-click listener to a ul to manage its li children, filtering text nodes and coloring elements green with a while loop.
Learn how to control object properties in JavaScript by using defineProperty to set enumerable and configurable attributes, hide properties from loops, and manage deletion.
Explore how to enforce immutability in JavaScript by using the writable attribute for properties, sealing objects to prevent adding or deleting properties, and freezing to lock all changes.
Explore method chaining in JavaScript, returning this to chain string and array methods (replace, toUpperCase, trim, concat, sort, join) and object methods (add score, do total, do average).
Explore the power of functions by introducing immediately invoked function expressions and closures, two key concepts used by advanced JavaScript programmers.
Explore immediately invoked function expressions (IIFEs), compare function declarations and expressions, learn how parentheses invoke them, and see why frameworks rely on IIFEs for encapsulation.
Avoid global variables by using closure and immediately invoked function expressions to manage scope and prevent collisions and namespace pollution.
Explore the namespace pattern to reduce global variables and avoid collisions by using a single global object (my app) with an iffy and closure, exposing greeting and add user.
Explore the module pattern as a way to organize JavaScript into discrete modules, using closures and immediately invoked function expressions, linking to the namespace pattern and Node.js module usage.
Explore implementing a modular fill-in question quiz in JavaScript, using the module pattern, DOM utilities, data attributes, and feedback logic to validate primitive data types.
assemble the module pattern from multiple files, create submodules for dom utilities and string utilities under util, and use dependencies and import globals to connect code across main.js.
Create a JSON file to store quiz data separately, enabling translation and easier data management, and learn how to structure JSON with quotes, fields, and an array of questions.
Windows Users
In this topic we cover MAMP in order to test JSON loading using a server. Since this topic was published, MAMP has not been consistently updated for Windows. If you are working on a Windows machine, I would encourage you to use WAMP. You can find more information and installation instructions here:
http://www.wampserver.com/en/
Note About this Lecture
This lecture comes from my course on Asynchronous JavaScript. I wanted to add it here because I feel it is important to know about the Fetch API for loading external files.
Advanced Topics picks up where the Getting Started course ended. You should now have some experience with JavaScript and understand the JavaScript language much better. Therefore, you are ready to learn more of the nuances and important patterns that advanced JavaScript developers know and use.
In Learn Modern JavaScript: Advanced Topics, we explore the more advanced techniques in JavaScript. You learn advanced concepts for objects and functions, the value of 'this', the power of functions using closure and IIFEs. You learn about the namespace and module patterns. You learn JSON and how to load a JSON file. You will follow along as we apply OOP concepts to a project. You get very familiar with the prototype, and these are just the main topics covered in this advanced course. A new bonus section helps you get familiar with functional programming concepts in JavaScript.
This course contains 15 sections and one bonus section, over 90 different lectures, over 17 hours of video, 4 quizzes, 9 assignments, 1 large project and several Think Like a Programmer sections with invaluable information for those intent on making JavaScript a career choice or a major part of their lives.
If you want to improve your JavaScript skills, this course is for you!