Category: JavaScript

  • JavaScript Arrow function

    Normal Function function aFunction(props){ return My Todo; } Arrow Function const aFunction = (props) => { return My Todo; }

  • Complete ReactJS Guide

    To be continued … React JS is a JavaScript library thats runs in the browser. React is all about component to building an application. We can divide a website into a number of components, like header, sidebar, widgets etc. By writing react components we can reuse those components across various pages in our website or […]

  • Complete guide to Javascript .map() function

    Javascript map() function can applies a function to each element in an array and returns a copy of the original array with modified values (if any). Syntax const newArray =, index, array) { // Do stuff with elmentValue (index and array are optional) }); Parameteres newArray – the new array that is returned oldArray […]

  • Complete guide to Javasript .reduce() function

    Javascript reduce() method reduces the array to a single value. It can also executes a provided function for each value of the array (from left-to-right). The return value of the function is stored in an accumulator (result/total). Syntax of .reduce() function array.reduce(function(total, currentValue, currentIndex, arr), initialValue) Parameters total Required – The initialValue, or the previously […]

  • Javascript .map() function to iterate array and object items

    .map() with call back function .map() accepts a callback function as one of its arguments, and an important parameter of that function is the current value of the item being processed by the function. This is a required parameter. With this parameter, we can modify each individual item in an array and create a new […]

  • Javascipt Class

    A class is a blueprint of object. Class can have properties and methods //in ES7 class Car { //eliminating constructor model = ‘BMW’; printModel = () => { console.log(this.model); } } class Human { constructor (){ this.gender = ‘male’; } printGender(){ console.log(this.gender); } } class Person extends human { constructor (){ super(); = “john”; […]

  • Arrow Function Syntax

    const printMyName = (name) => { console.log(name); } printMyName(‘John’); const multiply = number => number*2; console.log(multiply(2));

  • Mastering JavaScript Part 1, JavaScript Cheat Sheet 1

    In this particular post I will write all the comments in inside the code. It will be easy to have all the functions in a single location so that you can go through all the topics all at once. // // Declaring an Array var myArray = new Array(); // Using Array Constructor, try to […]

  • JavaScript Array Vs JavaScript Object – Complete guide

    Most of the new developers faces huge trouble to identify the difference between JavaScript Array and JavaScript Object. This particular post will help you to pass your initial hurdle and you will be able to play efficiently with JavaScript Array and JavaScript Object How to Define JavasCript Array? // // Declaring an Array var myArray […]

  • List and Keys in React JS by using map() function

    In React JS .map() or map function used to print array element. In normal Javascript you can use a for loop to render or print array elements. On the other hand by using .map() function you can print or render an array easily by typing small amount of code. Rendering an array in React JS […]