JavaScript Higher-Order Functions: A Guide with Examples

Functions are one of the fundamental building blocks in Javascript. A function is a set of statements that perform a task or calculate a value. They come in handy as they simplify our program’s structure, readability, and reusability by abstracting the implementation of a particular algorithm. As a functional language, Javascript supports the concept of … Read more

A Complete Guide to JavaScript Currying: What Does it Mean?

Functional programming in Javascript allows you to pass a function as an argument and return a function. This programming style introduces you to several concepts you would also encounter in other programming languages like Python, Erlang, Scala, and many more. They include: Function currying Pure and Impure functions High order functions We already did a … Read more

A Complete Guide to Pure and Impure Functions in JavaScript

There are two popular terms you will encounter when working with functional programming in Javascript – Pure and Impure functions. It’s also a common topic you will likely come across in most Javascript interviews. On the surface level, the two might look quite similar. However, it would be best to have an in-depth understanding as … Read more

Difference Between package.json and package-lock.json

When working on a project that utilizes NPM, you will find two files in your project root folder – the package.json file and the package-lock.json file. Most developers take note of only the former (package.json) since it’s where they write the scripts to start an application. However, what is the purpose of the two files? … Read more

How to Create an Ethereum Smart Contract using Solidity

By now, there is a high probability that you have come across the buzzword “smart contracts,” which are associated with blockchain platforms like Ethereum. However, what precisely is a smart contract, and how does one make one? This article will show you how to use the Solidity programming language to create an Ethereum smart contract. … Read more

The Complete Guide To JavaScript Promises (Explained)

When working with Async javascript, there are three main methods that you will interact with, namely Callbacks, Async/Await, and Promises. This post will focus on the latter – Promises in javascript. Promises are a powerful feature in asynchronous Javascript, and there is a high chance that you will be asked a question regarding Promises in … Read more

How to use Array Reduce in JavaScript: A Complete Guide

The Array Object in Javascript supports several methods that you can use to manipulate the array elements. These include the array.map(), array.sort(), array.filter(), array.reduce() etc. The latter – array.reduce() method – is regarded as one of the most tricky array methods and can be quite hard to understand at first glance. However, it’s a powerful … Read more

How to use Array Sort in JavaScript: A Complete Guide

Arrays always come in handy when writing any piece of Javascript code. You can use them to hold a list of items either as objects, strings, numbers, or a mix of both strings and numbers. Similar to other programming languages, the Array object in Javascript supports a variety of methods. They include: pop(), push(), toString(), … Read more