React Map function
in react map function every element is going in a loop and the element or components should be in array []
like [ ]
we can call function under function or we say that call function under map function
we can write map function
let a = [12,3,4,5,5];
const no = a.map(function(x){
return x*2;
}
);
console.log(no);
and also
function n(x){
return x*2;
}
Comments
Post a Comment