JavaScript fundamental you need to know

  1. Arrow function and multiple parameter

in javaScript ES6 released arrow function it is another structure of function

it is very simple to use in your code. if you want to pass one parameter then you don’t have to write first bracket. and if you are not using second bracket it will be return manually what do you want . in this example i will explain

const example = one => console.log(one);

if you are using second bracket you need to return it. for example

const example = num => {

return num * 2;
};

if you want to pass more than one parameter in this case you have to write parameter with first bracket.

const example = ( num1, num2 ) => num1 + num2;

--

--

jobayer majumder
0 Followers

an enthusiastic JavaScript developer with knowing some framework for the front-end and the backend. I have a lot of interest in data structures and Algorithms ,