JavaScript
JavaScript rest operator
The rest operator in JavaScript is a series of 3 dots (…) and is used to put the rest of some values into an array and then assign it to the value specified after the 3 dots. The best way to learn how to use the rest operator is to look at a few examples. […]
JavaScript destructuring
In JavaScript we work a lot with Objects, especially in React when each component is an Object and we’re passing props which are Objects. We’re often required to unpack the objects to use the variables they contain and JavaScript destructuring is one way we can do this.
JavaScript Array.filter() and Array.find()
After learning how to iterate through items in an array using Array.map(), there are other useful functions which make it easy to use and manipulate data in an array. We’ll look at filtering and finding items in an array.
JavaScript Array.map()
The JavaScript Array.map() function allows you to easily loop over the items of an array without having to create your own loop. This can make your code more readable and easier to maintain.
JavaScript callback functions
Functions exist in most programming languages and are an important aspect of JavaScript. A function is a block of code which performs a specific task defined by the programmer. Using functions allows us to avoid writing the same code multiple times to do the same task.
In JavaScript a function is an object which means we can pass it as an argument to another function. This concept is known as a callback function.