We are discuss here javascript tricky things. It will be helpful for you.

The map method creates a new array with the results of calling a provided function on every element in this array. Using map will call a provided callback function once for each element in an array, in order, and constructs a new array from the results.

The function that we pass as the first parameter of the reduce method receives two parameters, a and b. In this code, a is our accumulator. It will accumulate our sum as our function works. b is the current value being…

We are discuss here React Core Concept. It will be helpful for you.

JSX means JavaScript XML. JSX looks HTML. But it’s not html. JSX is a preprocessor step that adds XML syntax to JavaScript. You can definitely use React without JSX but JSX makes React a lot more important. Since JSX is closer to JavaScript than to HTML.

React component is very important for us. React component has two type as class component and function component. When creating a React component, the component’s name must start with an upper case letter. …

We are discuss here JavaScript Fundamental Concept. It will be helpful for you.

Data types is an important concept. There have some data type as string, number, boolean, undefined, null, operator, objects, array etc. Strings are written with quotes. Booleans can only have two values true or false. Boolean are used in conditional statement.

Sometime we are doing mistake in our programming. Then we need to fix this problem. JavaScript Errors help us to catch this error. When our project have bug this time our project don’t executed. But if we use try to catch then our project executed still…

There is a discuss JavaScript Fundamental Concepts.

The javascript function is very important for a website. When we click the button for form submit on our website then we need function. Because we write our all logic put in this function. The function has some type as a simple function, arrow function, returning function, anonymous function and have some other function.

An object is another important thing. Everything is an object. Object break big element and sort its small part by part. Objects contain have much value like function etc. …

Node.js is perfect for event-driven applications.

Events in Node.js

Every action on a computer is an event. Like when a connection is made or a file is opened.

Objects in Node.js can fire events, like the readStream object fires events when opening and closing a file.

Events Module

Node.js has a built-in module, called “Events”, where you can create-, fire-, and listen for- your own events.

To include the built-in Events module use the require() method. In addition, all event properties and methods are an instance of an EventEmitter object. To be able to access these properties and methods, create an EventEmitter object:

The EventEmitter Object

You can assign event handlers to your own events with the EventEmitter object.

In the example below we have created a function that will be executed when a “scream” event is fired.

To fire an event, use the emit() method.

Lifecycle of Components

Each component in React has a lifecycle which you can monitor and manipulate during its three main phases.

The three phases are: Mounting, Updating, and Unmounting.


Mounting means putting elements into the DOM.

React has four built-in methods that gets called, in this order, when mounting a component:

  1. constructor()
  2. getDerivedStateFromProps()
  3. render()
  4. componentDidMount()

The render() method is required and will always be called, the others are optional and will be called if you define them.


The constructor() method is called before anything else, when the component is initiated, and it is the natural place to set up the initial state and other initial values.

The constructor() method is called with the props, as arguments, and you should always start by calling the super(props) before anything else, this will initiate the parent's constructor method and allows the component to inherit methods from its parent (React.Component).

What is ECMAScript 6?

ECMAScript 6 is also known as ES6 and ECMAScript 2015.

Some people call it JavaScript 6.

This chapter will introduce some of the new features in ES6.

  • JavaScript let
  • JavaScript const
  • JavaScript Arrow Functions
  • JavaScript Classes
  • Default parameter values
  • Array.find()
  • Array.findIndex()
  • Exponentiation (**) (EcmaScript 2016)

Sofiqur Rahman

Full Stack Web Developer

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