The JavaScript “this” Keyword Deep Dive: An Overview

Learn the subtle yet critical details that allow you to leverage the JavaScript “this” keyword. In JavaScript, the “this” keyword is one of the most overly-used yet under-utilized aspects of the language. It is also one of the most mis-understood topics. While it facilitates more readable, expressive object-oriented JavaScript, improper use is a catalyst for […]

Book Review: High Performance JavaScript by Nicholas C. Zakas

While JavaScript engines are getting faster every day, complex logic or heavy DOM manipulation can still lead to sluggish browser performance. Nicholas C. Zakas takes you on a journey into the more subtle areas of JavaScript, providing a deeper understanding of how to create faster and more responsive user interfaces For many front-end web developers, […]

Angular 1.x Data-Binding Basics: the ng-model Directive (Part III)

Although the Angular ng-model directive creates a privately-scoped object for an element, any descendants of that element also have access to that object. In the previous article of this series: “Getting Started With Angular.js: Data-Binding Basics With the ng-model Directive (Part II)” we demonstrated how two HTML elements with their own unique ng-controller values can […]

Angular.js Data-Binding Basics: the ng-model Directive (Part II)

Learn how to use the exact same HTML, yet let Angular bind that markup to different pieces of data. In Part I of this series: “Getting Started With Angular.js: Data-Binding Basics With the ng-model Directive (Part I),” we covered the absolute basics of data-binding with Angular.js. In that article, we discussed how multiple elements can […]

What Are the Top 10 JavaScript Links for AJAX ?

Over the years I’ve amassed a list of web sites that have strong content about AJAX. Iv’e managed to whittle it down to ten. This list will change often. Ajaxian Other than having a domain that clearly indicates a focus on AJAX, this site offers create content about not only AJAX, but also other […]

Getting Started with the Google Maps JavaScript API – Part I

Getting a Google Map to show in a web page requires an astonishingly small amount of JavaScript. In this article, we’ll show the user where they are on earth in 12 lines of code. Since 2005, the Google Maps API has driven one of the most popular web-based applications ever: Google Maps. What I find […]

Book Review: Async JavaScript, by Trevor Burnham

Learn to master the tricky nature of asynchronous JavaScript with “Async JavaScript – Recipes for Event-Driven Code“. This short yet thorough book explains many concepts which not only demystify the subject, but also arm you with tools to architect smarter solutions. There are books that explain how JavaScript works, and then there are books that […]

Getting Started with HTML5 Web Workers – Part I

HTML5 Web Workers significantly minimize the limitations imposed by JavaScript’s single-threaded nature, allowing you to keep the browser responsive. HTML5 Web Workers significantly minimize the limitations imposed by JavaScript’s single-threaded nature, allowing you to keep the browser responsive. When folks express their excitement about HTML5, the discussion is usually focused around features such as the […]

Making a Simple HTTP Server with Node.js – Part III

In Part II of this series: Making a Simple HTTP Server with Node.js – Part II we learned how to use the “path” and “file system” modules. By leveraging these Node.js modules, we were able to read the path of the HTTP request that our server received, and read from the file system of the web […]

Getting Started with Require.js – Part III

Learn How to Build a Social Media Plugin, Using Require.js and the Asynchronous Module Definition (AMD) Pattern In Getting Started with Require.js – Part II, we took a closer look at the way the Require.js JavaScript library works. We created modules that depended on other modules, and learned how the return value of a module […]

Using the jQuery Promise Interface to Avoid the AJAX Pyramid of Doom

Nested success callbacks are messy business. The jQuery Promise interface provides a simple and elegant solution. So, you have to make an AJAX call, and then do something with the return data. No problem, right? Right. What if you have to make two AJAX calls, and then do something with the return data for each […]

Most Popular Articles

Node.js Tutorials Angular Tutorials JavaScript Tutorials Create a Node Websocket Server in Five Minutes The Websocket protocol provides full-duplex communication channels over a single TCP connection. In the past, web clients had to employ long-polling or the repeated pinging of a server in order to achieve this kind of “push” functionality. Now, Websocket technology eliminates […]

jQuery Plugin Authoring – The Absolute Basics – Part II

Once you have jQuery plugin basics down, it’s time to implement some best practices In the previous post “jQuery Plugin Authoring – The Absolute Basics – Part I”, we to a detailed look at the architecture of a jQuery plugin. Now that you understand the building blocks, let’s discuss a few best practices. These techniques […]

JavaScript Closures – The Absolute Basics: Getters and Setters

The next step in mastering JavaScript closures is being able to “get” or “set” a private variable. In Part I of this series: JavaScript Closures – The Absolute Basics, I discussed wrapping one function with another, which produces a closure. When that returned function is assigned to a variable, as long as that variable is […]

Understanding Scope in JavaScript

Although the ‘with’ statement creates a block-level scope effect, and recent implementations of the “let” statement have the same effect, these are fodder for another conversation. I’m not a big fan of the “with” statement, and at the time of this writing, you can’t be 100% sure that the “let” statement is fully supported by […]

How to Create a JavaScript Object Literal

Learn how to quickly and easily create your first Object Literal, and give it properties and methods There seems to be a bit of mystery surrounding the subject of JavaScript Object Literals. It is actually a simple concept and it’s easy to get started. There is a great deal of depth to the subject, but […]

What’s the difference between jQuery.ajax(), jQuery.get() and

jQuery offers three Ajax calls that are simple and painless Although it is a good idea to understand Ajax in the context of native JavaScript, leveraging the power of JavaScript libraries for your Ajax calls is not a bad idea. Depending on the size and complexity of your application, it can often minimize the amount […]

JavaScript Closures – The Absolute Basics

Demystifying this topic is one of the most important steps towards truly understanding the JavaScript language It is a little difficult to get your head around JavaScript closures without a basic understanding of scope. I will not attempt to tackle that subject in any kind of detail here. But let’s at least consider this thought: JavaScript […]

How to Use the jQuery replaceWith Method

The replaceWith() method provides a way to completely remove an element and put another in its place Most of the time, jQuery is used to add click event handlers to DOM elements, and there’s nothing wrong with this. In fact, jQuery is so helpful in this context, it’s hard to argue against using it for […]

JavaScript Interview Questions: Object-Oriented JavaScript

QUESTION: True or False: the terms “scope” and “context” refer to the same thing in JavaScript. Click for Answer False Explanation: Scope pertains to the visibility of variables and in contrast, context refers to the object to which a method belongs (which can be changed by using call or apply). QUESTION: If you omit the […]