JavaScript Tutorials

  • By
    Detect Supported Video Formats with JavaScript

    Over the past few years we've been seeing new audio, video, and image formats take shape to challenge the legacy formats that we've used since the web's inception.  This is a great development as we have more processing power and better compression algorithms have been developed...

  • By
    Creating a Cloudinary Vue Component

    While React.js has taken much of the attention during the latest wave of JavaScript frameworks, Vue.js has quietly become a favorite of many developers that find React overly complex and don't want to deal with the webpack tooling.  With Vue you can simply include the Vue...

  • By
    Node.js Debugging

    Proper logging is of massive utility for web apps, both during development and after deployment.  What can sometimes be difficult is organizing both the code and output of logging, i.e. knowing where each log message is coming from.  I recently found debug, a Node.js utility...

  • By
    Object.create(null)

    One of the funnest parts of JavaScript, or any programming language really, is that there are loads of tiny tricks and quirks that make the language that much more interesting.  I recently learned a nice fact about Object.create:  using null as the only argument to create an...

  • By
    Node.js Port Scanner

    Node.js has become an incredible tool for creating services or utilities that act like a service.  Usually it's npm start, wait a moment, and you'll see the utility provide an address and port; a good example being localhost:8000.  One thing that bugs me about this pattern...

  • By
    Observing Intersection Observers

    As developing for the web has matured and JavaScript engines have become faster, one area remains a significant bottleneck - rendering. It's because of this that so many of the recent development efforts have been focused around rendering, with virtual DOM being one of the more...

  • By
    Create Zip Files with JavaScript

    While we're doing amazing things with JavaScript on the server side, it's important not to take our eyes off of some of the great stuff happening on the client side.  One such awesome project I recently discovered was JSZip:  a JavaScript library that allows you...

  • By
    async & await

    JavaScript promises were a revelation in JavaScript, providing an alternative to the JavaScript callback hell we'd quickly found ourselves in.  Promises also allowed us to introduce and better handle asynchronous tasks.  While promises were an improvement over callback hell, they still require lots of thens...

  • 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
    Detect WEBP Support with JavaScript

    Image optimization is a huge part of improving front-end performance.  We've traditionally used JPG/JPEG, GIF, and PNG images but Google and the Chrome team developed the WEBP format which crunches file size and optimizes rendering.  If you go to a site like GIPHY in Chrome you'll...