In this article we will cover 10 common topics in JavaScript. So let’s get started.

1. Truthy and falsy values

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.

1. What is react

React is basically just a very high level language than manipulating the DOM, a…

1. Spread operator

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…

Arrays.

How to use the sort method?

The method has the following syntax:

someArray.sort([compareFunction])

Omitting the 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…

Ashutosh Biswas

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store