Skip to content

Instantly share code, notes, and snippets.

@hudochenkov
Last active November 10, 2018 22:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save hudochenkov/29b739f8dbdb4aa00a46b953f62dd0a6 to your computer and use it in GitHub Desktop.
Save hudochenkov/29b739f8dbdb4aa00a46b953f62dd0a6 to your computer and use it in GitHub Desktop.
{"name": "sort-error", "version": "0.0.0", "bin": "./sort.js"}
#!/usr/bin/env node
const declarations = [1, 2, 3, 4];
declarations.sort((a, b) => {
console.log(`a: ${a}, b: ${b}`);
return a - b;
});
console.log(declarations);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment