JSFiddle - React, Tailwind, and code Playground
by booktu8
JavaScript
var arr = [1, 2, 3];
var newArr = arr.map(item => {
return item + 1;
}); // [2, 3, 4];
console.log(arr)
by booktu8
var arr = [1, 2, 3];
var newArr = arr.map(item => {
return item + 1;
}); // [2, 3, 4];
console.log(arr)