JavaScript Tutorials

  • By
    Build a Decentralized Web Chat in 15 Minutes

    In this 15 minute tutorial we're going to build a simple decentralized chat application which runs entirely in a web browser.All you will need is a text editor, a web browser, and a basic knowledge of how to save HTML files and open them in the browser.

    By
    Adding Search to Your Site with JavaScript

    Static website generators like Gatsby and Jekyll are popular because they allow the creation of complex, templated pages that can be hosted anywhere. But the awesome simplicity of website generators is also limiting. Search is particularly hard. How do you allow users to search...

  • By
    I Don’t Hate Arrow Functions

    TL;DRArrow functions are fine for certain usages, but they have so many variations that they need to be carefully controlled to not break down the readability of the code.While arrow functions clearly have a ubiquitous community consensus (though not unanimous support!), it turns out there's a...

  • By
    Write Your First Service Worker in 5 Minutes

    What is a service worker?A service worker is a little file that will allow you to cache files and other assets on a user's machine. How is this different from server-side caching? Because the assets are stored on a user's machine, rather than a server...

  • By
    JavaScript Proxy

    I've always loved the flexibility of Objects and prototypes in JavaScript, but for a long time, I felt that a level of dynamism was lacking. JavaScript eventually added get and set methods for object properties, which was an awesome step, but there was still room...

  • By
    prefers-color-scheme: CSS Media Query

    One device and app feature I've come to appreciate is the ability to change between light and dark modes. If you've ever done late night coding or reading, you know how amazing a dark theme can be for preventing eye strain and the headaches that result.

  • By
    React indeterminate

    I've fallen in love with React.js and JSX over the years; state-based rendering and a logical workflow have made me see the light of this modern framework. That doesn't mean I don't sometimes get a bit frustrated that the "simple" things seem harder than they should...

  • By
    JavaScript Labels

    No matter how long you've been a JavaScript developer, there will always be language features that you didn't know about until you saw them in a fringe piece of code. Your reaction generally is a bit like:One of those features I see developers quizically trying...

  • By
    Background Sync with Service Workers

    Service workers have been having a moment. In March 2018, iOS Safari began including service workers -- so all major browsers at this point support offline options. And this is more important than ever -- 20% of adults in the United States are without Internet at...

  • By
    Nested Destructuring

    Destructuring in JavaScript can initially feel confusing but the truth is that destructuring can make your code a bit more logical and straight forward. Destructuring does look a bit more complex when you're looking for a property several objects deep, so let's have a look...