Define Map Reduce? Explain the implementation of a map reduce with suitable example.
Example: map and reduce an array in js
const rebels = pilots.filter(pilot => pilot.faction === "Rebels");const empire = pilots.filter(pilot => pilot.faction === "Empire");