Kyle Simpson Tutorials

    Kyle Simpson is an Open Web Evangelist from Austin, TX, passionate about all things JavaScript. He's an author, workshop trainer, tech speaker, and OSS contributor/leader.

  • By
    Thinking JavaScript

    I was teaching a JavaScript workshop the other day and one of the attendees asked me a JS brain teaser during the lunch break that really got me thinking. His claim was that he ran across it accidentally, but I'm a bit skeptical; it might just...

  • By
    Functional Programming (FP) By Any Other Name…

    Don't worry, this is not YAMA (yet another monad article)! Instead, I want to talk about a library I've recently released that offers a helpful twist on typical functional programming ("FP") operations (like map(..), compose(..), etc). Before we jump in: if you're like me and have tried...

  • By
    ES6: Features By Testing

    TL;DR Use the FeatureTests.io service to perform feature tests of ES6+ features. The results of these tests are cached by default in the user's browser, and shared across all sites the user visits that use this service. In the bootstrapper for your site/app, check the results of...

  • By
    Fixing Coercion, Not The Symptoms

    TL;DR Your complaints of x == y behaviors being weird, buggy, or downright broken have all blamed == as the culprit. No, it's really not. == is pretty helpful, actually. The problems you're having are not with the == operator itself, but with the underlying values and how...

  • By
    For and against `let`

    In this post I'm going to examine the case for (and perhaps against?) one of the new features coming in JavaScript ES6: the let keyword. let enables a new form of scoping not previously accessible generally to JS developers: block scoping. Function Scope Let's briefly review the basics...

  • By
    Unwrapping JSON-P

    This is a quickie simple post on JavaScript techniques. We're going to look at how to unwrap the "P" function-call padding from a JSON-P string to get the JSON from it. Note: Obviously, the recent push toward ubiquity of CORS is making JSON-P less important...

  • By
    Using String Replace in JavaScript

    This is a quickie simple post on JavaScript techniques. We're going to cover how to use the regular expression driven replace(..) with JavaScript string values. All string values have a replace(..) method available to them. This method allows you to pass a regular expression (or a string...

  • By
    Combining JavaScript Arrays

    This is a quickie simple post on JavaScript techniques. We're going to cover different methods for combining/merging two JS arrays, and the pros/cons of each approach. Let's start with the scenario: The simple concatenation of a and b would, obviously, be: concat(..) The most common approach is: As you can see...

  • By
    Getting Concurrent With ES6 Generators

    If you've read and digested part 1, part 2, and part 3 of this blog post series, you're probably feeling pretty confident with ES6 generators at this point. Hopefully you're inspired to really push the envelope and see what you can do with...

  • By
    Going Async With ES6 Generators

    Now that you've seen ES6 generators and are more comfortable with them, it's time to really put them to use for improving our real-world code. The main strength of generators is that they provide a single-threaded, synchronous-looking code style, while allowing you to hide the...