Skip to content
Advertisement

how to get some data from one big array

I have a js file that has an array of people.

data.js

JavaScript

In another file, I want to get data from an array and form my array with name, gender data.

I use the map, but I can’t figure out how to implement it.

JavaScript

Advertisement

Answer

Your data is an array so you will have to use its index.

JavaScript
User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement