Create array map

This commit is contained in:
LSvekis
2021-07-01 16:52:33 -04:00
committed by GitHub
parent 38bbd70e74
commit 4c1187e10b
+7
View File
@@ -0,0 +1,7 @@
const myArr = [1,4,5,6];
const myArr1 = myArr.map(function(ele){
return ele * 2;
});
console.log(myArr1);
const myArr2 = myArr.map((ele)=> ele*2);
console.log(myArr2);