Advertisement
Guest User

Untitled

a guest
Aug 23rd, 2019
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. const showMeArgs = (first, second, third) => {
  2. console.log(`${first}, ${second}, ${third}`);
  3. };
  4.  
  5. ['1', '1', '2', '3', '5'].map(showMeArgs);
  6.  
  7. // ou ainda passando console.log diretamente
  8. ['1', '1', '2', '3', '5'].map(console.log);
  9.  
  10. // Resultado:
  11. // 1 0 ["1", "1", "2", "3", "5"]
  12. // 1 1 ["1", "1", "2", "3", "5"]
  13. // 2 2 ["1", "1", "2", "3", "5"]
  14. // 3 3 ["1", "1", "2", "3", "5"]
  15. // 5 4 ["1", "1", "2", "3", "5"]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement