Refactoring Magic Numbers
Magic numbers are numbers that appear in your source code without any explanation of what they stand for. Usually, this is because they are used directly »
Magic numbers are numbers that appear in your source code without any explanation of what they stand for. Usually, this is because they are used directly »
JavaScript 2015 is the next version of JavaScript. Its official name is ECMAScript 2015 and sometimes it's called ES6. This article discusses how you can use »
How can you make this if statement more readable? if (currentUser !== null) { displayUserName(); } The condition inside an if statement can often be moved out of the »
I often see people on programming forums argue that certain coding techniques or naming conventions increase your code's file size. Larger files mean longer downloads and »
Loops are one of the first concepts new programmers learn about. However, they often aren't the most readable way to write code that works with lists. »
There are several common naming conventions for variables that refer to DOM elements. This article describes how they work and what they aim to do. What »
When is it ok to use single-letter variable names? The short answer Generally single-letter variable names are bad for readability. However, there are a few exceptions »
Underscore.js is a popular JavaScript library that contains 112 commonly needed helper functions. These functions often aren't very complex, but you can use them to »
In JavaScript, options objects are a common pattern for passing arguments into a function. This article explains how they work and why using them makes your »
You can find a lot of questions on programming Q&A sites by people wondering whether it's worth splitting off a single line of code »