Skip to content

Instantly share code, notes, and snippets.

@chuck0523
Created December 5, 2015 03:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chuck0523/916f389f14aa1a3dd314 to your computer and use it in GitHub Desktop.
Save chuck0523/916f389f14aa1a3dd314 to your computer and use it in GitHub Desktop.
var data = [];
var strToAry = function(line) {
for(var i = 0, num = ''; i < line.length; i++){
if(line[i] !== ' ') {
num += line[i];
} else {
data.push(num);
num = '';
}
}
data.push(num);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment