javascript

All posts in the "javascript" category

Meteor Hosting Options

Meteor is a fast and accessible framework for building Node.js apps. It makes building MVPs and learning web development very accessible. There are multiple Meteor hosting options currently available.

React Clock

Build a digital clock that updates every second.

JavaScript: Stock Prices Problem

Write a function that takes an array of stock prices and returns the best profit you could make from one purchase and one sale.

JavaScript Event Loop

Tutorial on JavaScript's call stack, callback queue, and event loop.

JavaScript Range Array Function

Python has a very handy range array function that I find myself using all the time. Unfortunately JavaScript does not, but we can quickly implement our own functionality.

JavaScript: Map, Filter, Reduce

JavaScript’s built-in map, filter, and reduce array methods are invaluable to a modern JavaScript developer. First introduced in 2011, these methods go way beyond the traditional for loop for traversing...

Currying in JavaScript

Currying is a fundamental tool in functional programming, a programming pattern that tries to minimize the number of changes to a program’s state (known as side effects) by using immutable...

JavaScript Scope and Closures

Closures and scope are fundamental parts of JavaScript but often poorly explained and therefore the source of confusion to many developers. This is my take on explaining them to someone...

JavaScript Double Negate (aka !!)

JavaScript features the odd but commonly used double negate operator !!, which is used to create a Boolean from a value.

JavaScript Temporal Dead Zone

The Temporal Dead Zone is a behavior in JavaScript that occurs when declaring a variable with the let and const keywords, but not with var. A shorthand you’ll often hear...

JavaScript Hoisting

Hoisting is a behavior in JavaScript where variable and function declarations are “hoisted” to the top of their scope before code execution. This can result in confusing behavior, such as...

JavaScript Arrays: slice vs splice

In JavaScript, it is easy to confuse slice and splice. I certainly do it all the time. They have similar names but act in very different ways. Here’s a quick...

JavaScript Arithmetic Operators

JavaScript’s arithmetic operators perform addition (+), subtraction (-), multiplication (*), and division (/). Mozilla has a great overview of them, but it fails to mention any of the edge cases...

Install Node.js and NPM on a Mac

JavaScript is one of the most popular programming languages in the world. It is built into most web browsers and used to add interactivity to websites. With Node.js, a “JavaScript...

Install Node.js and NPM on Windows

JavaScript is one of the most popular programming languages in the world. It is built into most web browsers and used to add interactivity to websites. With Node.js, a “JavaScript...

Node Rest API Tutorial

This tutorial will show you how to build a simple REST API with Node.js and Express.js, a popular and lightweight framework for building Node.js apps.

NextJS/Zeit for Total Beginners

NextJS is a very interesting, minimalistic framework for server-rendered React applications. If you’re new to React or NodeJS in general, the current documentation for NextJS can be confusing.

Teaching Meteor to Beginners

Summary: Meteor is an incredibly accessible web framework for beginners. Its ease of setup, deployment, and Javascript-only configuration are game changers compared with competing frameworks like Django or Ruby on...

Meteor Developer Login Accounts

Meteor has a Developer Accounts login package similar to Google or Facebook login. Here’s a quick tutorial to get you up and running.

Meteor Anchor Tags

Anchor tags don’t work in Meteor. This is a known issue.

Meteor Stripe Checkout

Note: This tutorial covers how to implement Stripe Checkout for versions of Meteor 1.1 and earlier. It does not work for the most recent version of Meteor.