Skip to content

Instantly share code, notes, and snippets.

@katepapineni
Created July 22, 2020 14:32
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save katepapineni/50e072d54008966e97a7a2a6ad57dda9 to your computer and use it in GitHub Desktop.
Save katepapineni/50e072d54008966e97a7a2a6ad57dda9 to your computer and use it in GitHub Desktop.
const ids = [];
const data = ['139', '576'];
data.map(id => ids.push(Math.max(...id)));
// What's the output?
console.log(ids);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment