Show array data without for loop in javascript
Use below code
<script>
const strs1 = ["one ", "two", "three"];
const newst1 = strs.map(st => { console.log(st)});
const mynum = [1, 2, 3];
const newnum = mynum.map(num => { console.log(num)});
</script>
0 comments:
Post a Comment