image2text

Untitled

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