map to fumction javascript code example
Example: map function javascript
var rebels = pilots.filter(function (pilot) { return pilot.faction === "Rebels";});var empire = pilots.filter(function (pilot) { return pilot.faction === "Empire";});
var rebels = pilots.filter(function (pilot) { return pilot.faction === "Rebels";});var empire = pilots.filter(function (pilot) { return pilot.faction === "Empire";});