If you're developing a web application using React and ES6/ES2015, you may have cursed at the computer or impatiently tapped your fingers while waiting for files to compile and then having to manually reload the browser to see the latest changes. I used to use Gulp to help streamline…
Performance Differences for Inserting Into an Array
I was bored and curious and decided to compare the performance among different ways of inserting an element into the middle of an array. I tried three methods: Using Array.splice() Using Array.slice() and Array.concat() Using the ES6 rest operator The winner was using the combination of Array.…
ES6 Promises: Best Practices
After using more and more promises lately, I've gathered a handful of good and bad design patterns for promises. I'm going to list out some examples of how promises are typically used and demonstrate anti-patterns and how to clean them up. Like everyone, I've been guilty to some of these…
Preview of ES6
Who's excited for ES6? Hold on to your socks. Here is a sneak peek of what's to come in ECMAScript 6. let and const let can be used to declare variables just like var, but let has no hoisting, it has lexical scoping within () and {} blocks, and you cannot redeclare…