Skip to content

Instantly share code, notes, and snippets.

@dikarel
Created October 2, 2016 07:14
Show Gist options
  • Save dikarel/6888eeb795993a0f00bf87d9eac60b71 to your computer and use it in GitHub Desktop.
Save dikarel/6888eeb795993a0f00bf87d9eac60b71 to your computer and use it in GitHub Desktop.
HackerRank utilities
// Minified one-liner
var main=d=>{var l=[];return require('readline').createInterface({input:process.stdin}).on('line',i=>l.push(i)).on('close',()=>d(l))}
// Example
main(lines => {
console.log('My lines are', lines)
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment