A value is considered truthy if it’s coerced to true in a Boolean context and other wise it’s a falsy value.
There is handful of falsy values. And rest are truthy values. …
The goal of this article is not write code in react. If you don’t have any idea on what is React, then this is right start. Just 10 easy to digest points. So let’s get started.
React is basically just a very high level language than manipulating the DOM, a…
It’s a handy tool to get the contents out of an array or object. For example you can use it like below to copy an array:
const array = [1, 2, 3]
const copy = [...array];
console.log(copy) // [1, 2, 3]
However note that it is a shallow copy…
The method has the following syntax:
compareFunction triggers default behavior which we will see at the end of this section. First let’s see how to use
compareFunction because it is cool!
compareFunction has two parameters: they represents any two arbitrary non-
undefined elements of
someArray of different indices(all…