Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const showMeArgs = (first, second, third) => {
- console.log(`${first}, ${second}, ${third}`);
- };
- ['1', '1', '2', '3', '5'].map(showMeArgs);
- // ou ainda passando console.log diretamente
- ['1', '1', '2', '3', '5'].map(console.log);
- // Resultado:
- // 1 0 ["1", "1", "2", "3", "5"]
- // 1 1 ["1", "1", "2", "3", "5"]
- // 2 2 ["1", "1", "2", "3", "5"]
- // 3 3 ["1", "1", "2", "3", "5"]
- // 5 4 ["1", "1", "2", "3", "5"]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement