Archive for the ‘Raw Javascript’ Category

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...

What Tutorials Don’t Tell You: How to Approach Projects

Posted on: No Comments
I often hear that people who follow tutorials find themselves unable to approach JavaScript projects on their own. One reason this happens is that tutorials give you a neat set of steps rather than the actual process of figuring out those steps on yo...

A Beginner’s Guide to JavaScript Variables and Datatypes

Posted on: No Comments
So you've decided to learn JavaScript, the programming language of the web. If it seems like a daunting journey ahead and you don't know where to start, here's a little secret: it doesn't take any special skill to learn how to program, and everyone st...

Filtering and Chaining in Functional JavaScript

Posted on: No Comments
One of the things I appreciate about JavaScript is its versatility. JavaScript gives you the opportunity to use object oriented programming, imperative programming, and even functional programming. And you can go back and forth among them depending on ...