Skip to content

Instantly share code, notes, and snippets.

@evild70
Created May 5, 2015 18:25
Show Gist options
  • Save evild70/b0ab387085bee31c9373 to your computer and use it in GitHub Desktop.
Save evild70/b0ab387085bee31c9373 to your computer and use it in GitHub Desktop.
Array of Random numbers source http://jsbin.com/nezuqejolo
var labels = [];
var times = function(n) {
return Array.apply(null, new Array(n));
};
var data = times(100).map(function(val, index) {
labels.push(index + 1);
// val = Math.round(Math.random() * 100);
val = Math.floor(Math.random() * (100 - 70 + 1)) + 70;
return val;
});
// console.log(labels);
console.log(data);
var arr = [];
for (var i=0; i<100; i++) {
arr.push(Math.round(Math.random() * 100));
}
console.log(arr);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment