image2text

Untitled

Aug 31st, 2019
297
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. // using Array.map
  2. const heroes = [
  3. { fullName: pider-Man', herold: 1 },
  4. { fullName: 'Iron Man', herold: 2 },
  5. 15
  6. const alterEgos = [
  7. { fullName: 'Peter Parker', heroId: 1 },
  8. { fullName: 'Tony Stark', heroId: 2 },
  9. 1g
  10. const unmaskedHeroes = heroes.map(h = {
  11. const f = alterEgos.find(a = a.herold == h.herold);
  12. return {
  13. hero: h.fullName,
  14. alterEgo: f.fullName,
  15. Iig
  16. D)
  17. console.log({unmaskedHeroes});
Advertisement
Add Comment
Please, Sign In to add comment