Skip to content

Instantly share code, notes, and snippets.

@mgmgpyaesonewin
Created December 20, 2017 07:44
Show Gist options
  • Save mgmgpyaesonewin/8b9a1407e4531bfa2019d97320532a4b to your computer and use it in GitHub Desktop.
Save mgmgpyaesonewin/8b9a1407e4531bfa2019d97320532a4b to your computer and use it in GitHub Desktop.
How to read line by line of data input in hackerank
function processData(input) {
//Enter your code here
var data = input.toString().split(/\r?\n/);
console.log(data[0]);
console.log(data[1]);
console.log(data[2]);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment