JavaScript Tutorials

  • By
    JavaScript Detect Async Function

    JavaScript async/await has changed the landscape of how we code. We're no longer stuck in callback or then hell, and our code can feel more "top down" again.Async functions require the following syntax:To use await with a function, the function needs to be declared with...

  • By
    7 Useful JavaScript Tricks

    Just like every other programming language, JavaScript has dozens of tricks to accomplish both easy and difficult tasks. Some tricks are widely known while others are enough to blow your mind. Let's have a look at seven JavaScript tricks you can start using today!Get...

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