Create a static file server with Node.js
Create your own static file server with Node.js in just 70 lines of code.
The JavaScript snippet collection contains a wide variety of ES6 helper functions. It includes helpers for dealing with primitives, arrays and objects, as well as algorithms, DOM manipulation functions and Node.js utilities.
Create your own static file server with Node.js in just 70 lines of code.
Learn different ways to memoize function calls in JavaScript as well as when to use memoization to get the best performance results.
Implement the K-means clustering algorithm in JavaScript to group data into clusters.
Convert the data from an HTML form into a JavaScript object or serialize it into a query string.
Pick up a few new tricks which you can use to clone arrays in JavaScript.
Learn how to implement the singleton design pattern in JavaScript, using the Proxy object.
Learn how to use the JavaScript ES6 spread syntax to converting iterables to arrays and level up your code today.
Learn how to manipulate JavaScript objects by flattening or unflattening them.
Learn all you need to know to effectively and efficiently typecheck values in JavaScript.
Asynchronously looping over arrays in JavaScript comes with a few caveats you should watch out for.
Convert between a query string and its object representation in JavaScript.
Learn how to combine two or more objects into a single object in JavaScript.
Learn how to perform HTTP GET, POST, PUT, and DELETE requests in JavaScript.
A binary tree is a hierarchical data structure of linked nodes with at most two children each.
Generate a UUID in JavaScript using native APIs in both the browser and Node.js.
Renders the given DOM tree in the specified DOM element.
A tree is a data structure consisting of a set of linked nodes representing a hierarchical tree structure.
JavaScript's arrow functions are seemingly the same as regular functions, but there are some important differences you need to know.
While these two properties are very similar, there are some key differences that you should be aware of.
Learn how to parse or serialize a cookie with JavaScript, quickly and effectively.
Implement the K-nearest neighbors algorithm in JavaScript to classify a data point relative to a labelled data set.
Learn how to easily convert between the various color formats, using JavaScript and a few simple formulas.
Parse a text file and return an array of lines, synchronously or asynchronously, using Node.js.
Find the most frequently occurring element in a JavaScript array of primitives or objects.