Archive for the ‘Raw Javascript’ Category

What Is Event Bubbling in JavaScript? Event Propagation Explained

Posted on: No Comments
Event bubbling is a term you might have come across on your JavaScript travels. It relates to the order in which event handlers are called when one element is nested inside a second element, and both elements have registered a listener for the same eve...

How to Make a Simple JavaScript Quiz

Posted on: No Comments
"How do I make a JavaScript quiz?" — this is one of the most common questions I hear from people who are learning web development, and for good reason. Quizzes are fun! They are a great way of learning about new subjects and allow you to engage your ...

Learning JavaScript Test-Driven Development by Example

Posted on: No Comments
You're probably already familiar with automated testing and its benefits. Having a set of tests for your application allows you to make changes to your code with confidence, knowing that the tests have your back should you break anything. It's possible...

Back to Basics: JavaScript Operators, Conditionals & Functions

Posted on: No Comments
Table of Contents JavaScript Operators Assignment Operators Arithmetic Operators Addition Subtraction Multiplication Division Modulus Increment Decrement Comparison Operators Equal Strict Equal Not Equal Strict Not Equal Less Than Less Than or Equal To...

The Basics of DOM Manipulation in Vanilla JavaScript (No jQuery)

Posted on: No Comments
Whenever we need to perform DOM manipulation, we're all quick to reach for jQuery. However, the vanilla JavaScript DOM API is actually quite capable in its own right, and since IE < 11 has been officially abandoned, it can now be used without any w...

Simplifying Asynchronous Coding with Async Functions

Posted on: No Comments
The debut of Promises in JavaScript has lit the internet on fire—they help developers break out of callback hell and solve a lot of problems that have plagued the asynchronous code of JavaScript programmers everywhere. Promises are far from flawless,...

How You Can Use HTML5 Custom Data Attributes and Why

Posted on: No Comments
In this article, I am going to show you how you can use HTML5 custom data attributes. I'm also going to present you with some use cases that you can find helpful in your work as a developer. Why Custom Data Attributes? Very often we need to store info...

Quick Tip: How JavaScript References Work

Posted on: No Comments
This article was originally published on Medium. TL;DR: There are NO pointers in JavaScript and references work differently from what we would normally see in most other popular programming languages. In JavaScript, it’s just NOT possible to have a r...

Quick Tip: How to Sort an Array of Objects in JavaScript

Posted on: No Comments
If you have an array of objects that you need to sort into a certain order, the temptation might be to reach for a JavaScript library. Before you do however, rember that you can do some pretty neat sorting with the native Array.sort function. In this...