Photo by Christina @ on Unsplash

1. What is React and Explain Major Features of React?

React is an open source frontend JS library used for building UI of web especially for Single Page Applications (SPA).

Major Features: 1. Uses virtual DOM instead of RealDOM 2. Supports Server Side Rendering (SSR) 3. Follow unidirectional data flow 4. Uses reusable UI components

2. How React Works?

  • React Creates a virtual DOM → When state changes in a components it first runs a diffing algorithm → Algorithm identifies what has changed in DOM.
  • Second step is ‘Reconciliation’, where it updates the DOM according to the results of diffing algorithm.

3. Difference between class components and functional components?

  • Class components: It allows us to use additional features such as local state…

Photo by Nicolas Picard on Unsplash

let and const

let and const basically replace var . You use let instead of var and const instead of var if you plan on never re-assigning this "variable". The value of const can’t be changed.

ES6 Arrow Functions

Arrow functions are a different way of creating functions in JavaScript. Besides a shorter syntax, they offer advantages when it comes to keeping the scope of the this keyword. Arrow function syntax may look strange but it’s actually simple.

For no arguments, use empty parentheses in the function declaration:

const animalName = () => {

For one argument, omit the parentheses:

const animalName =…

Lists of Top 10 JavaScript array methods all should know
Lists of Top 10 JavaScript array methods all should know
Photo by 🇨🇭 Claudio Schwarz | @purzlbaum on Unsplash

1. Push

arr.push(..element) adds a new element to the end of an array and returns the new length of the array. arr.push() method mutates the original array.

Nusrat Jahan

FrontEnd Web Developer | B.Sc in Info. & Comm. Engg.

Get the Medium app
