Speed Up Scroll Events with Passive Event Listeners
Improve your site's scrolling and touch performance by using passive event listeners for events.
Tagged Template Literals With ES6 / ES2015
Tagged template literals allow you to pass a function to be executed on the literal before it gets evaluated.
JSON.parse() and JSON.stringify()
A quick reference for the parse and stringify methods of the JSON object.
Introduction to localStorage and sessionStorage
Learn how to use localStorage and sessionStorage in your web apps.
Lazy Loading Scripts
An easy way to lazily load scripts on certain DOM events. In this example, we load the search script only on the user focus in a search input.
Service Workers: Using SW-Toolbox to Serve an Offline Page
Use Service Workers with SW-Toolbox to not only serve assets from the cache, but also to serve a custom offline page.
ES2015 (ES6) gives us native support for modules. Learn their simple syntax here.
Accessing Elements With querySelector and querySelectorAll
A Quick Introduction to the Yarn Package Manager
ES6 / ES2015 gives us two new keywords to declare variables: let and const. Learn how to use them and the difference with var.
Introduction to Progressive Web Apps: Service Worker and Web App Manifest
Progressive web apps allow you to create web apps that feel native by allowing access while offline & installing on the home screen. Get a big picture here.
New with ES6 / ES2015, generator functions allow to easily define functions that can return multiple values.
New with ES6 / ES2015, rest parameters allow you to more easily work with functions with an arbitrary number of arguments passed-in.
Using DOMParser to Parse HTML Strings
DOMParser can be used to create a DOM object from an HTML or XML string. See here how it's used.
Template Literals in ES6 / ES2015
Use console.time() and console.timeEnd() to see how your code performs.
Display data in tables in the console with the table() method.
Get the unicode value of a character at a specific position in a string with the charCodeAt method.
Get a character at a specific position in a string with the charAt method.
Convert a string's characters to lower or upper case with toLowerCase() or toUpperCase.
Simplify the syntax of simple if statements with the ternary operator. Here's how to use it.
Holmes: Fast Page Searching
Use Holmes for fast content search on a page.
Use split() on a string to split it into an array using a separator of your choice.
Use concat() on an array to concatenate with another array.
Share Button: Simple & Stylish Share Button
A simple, compact and beautiful share button for your website.
clipboard.js: Copy Text to the Clipboard
Easily copy text to clipboard in the browser with clipboard.js
Use push() on arrays to add new items to an array.
Use filter() on arrays to go through an array and return a new array with the elements that pass the filtering rules.
Use map() on arrays to return a new array with its items having passed through a function. Here's a quick snippet.
Immediately-invoked function expressions
Protect your code and avoid polluting with immediately-invoked function expressions (IIFE).