Skip to content

Instantly share code, notes, and snippets.

@itaditya
Last active August 1, 2020 14:44
Show Gist options
  • Select an option

  • Save itaditya/19fed77f159ec922c2fac61231c4f059 to your computer and use it in GitHub Desktop.

Select an option

Save itaditya/19fed77f159ec922c2fac61231c4f059 to your computer and use it in GitHub Desktop.
(Blog) Why named arguments are better than positional arguments
const numbers = ['1', '4', '8', '10'];
const result = numbers.map((item, index) => myCustomParseInt({ item, index }));
console.log(result); // [ 1, 4, 8, 10 ]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment