A few months ago, I saw someone one Twitter ask:
Can we create an object by looping on some data 🤔
Today, I wanted to write about how to do just that. Let’s dig in!
An example of some data Let’s imagine you got back an array of data from an API service called WizardSchool. It provided you with a list of wizards.
Each wizard in the array is itself an object that contains the wizard’s name, and an array of spells that they know how to cast.
Today, I’ve got one last excerpt from my new pocket guide and video course on Serverless with vanilla JS. We’ll be looking at HTTP methods: what they are, and when to use which one.
Let’s dig in!
What are HTTP methods? HTTP methods are verbs that describe the type of request you’re making to an endpoint.
The five most common are GET, POST, PUT, DELETE, and OPTIONS.
GET - Retrieve data from an API endpoint.
Building A Dynamic Header With Intersection Observer — Smashing Magazine
In JavaScript, attaching an event listener to constantly fire a callback on scroll can be performance-intensive. But there is a better way with Intersection Observer.
A guide to vanilla JavaScript code snippets — with resources and lightweight libraries to help you solve a problem without a large overhead or third-party dependencies.
In Table of Contents with IntersectionObserver on CSS-Tricks, Chris Coyier talks about sticky table of contents on long pages whose active state updates as you scroll. When talking about those, you can not not mention the wonderful Progress Nav by Hakim El Hattab. Final version of the progress nav! Switched to SVG and made it … Continue reading "Progress Nav with IntersectionObserver"
Functional Programming in JavaScript for Beginners
Functional programming is not a new approach to coding, but it has grown in popularity in recent years. This is because, once programmers understand the basics behind the technique (and are able to write clean and reliable code using it), applications written using a functional approach are much easier to
When writing code for the web, eventually you'll need to do some process that might take a few moments to complete. JavaScript can't really multitask, so
Use our automated wizard to generate privacy policy, terms and conditions, and other legal documents tailored for your website, mobile app or business.
Demystifying Async Programming in Javascript • Yunchi's
This blog post was first published as a codelab at https://github.com/button/codelab-async-js. Asynchronous programming in Javascript has undergone several evolutions, from callbacks to promises to generators, and soon to async/await. While each evolution has made async programming a little bit easier for those knee-deep in Javascript, it has made it rather intimidating to those new to all the little nuances of each paradigm to understand how to apply each, and just as importantly, how it all works.
One term you might hear in the JavaScript world is "higher-order function." Today, we'll explore what it means to be a higher-order function and look at some examples in JavaScript!
How not to sort an array in JavaScript | Phil Nash
Array sorting is one of those things you don’t spend too long thinking about, until it stops working for you. Recently I was working with array of items in JavaScript that were not sorting at all p...