Created
November 26, 2012 22:30
-
-
Save tqc/4151090 to your computer and use it in GitHub Desktop.
Generate random array for js graph
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var min = -5; | |
var max = 10; | |
var dataset = []; | |
for (var i = 0; i < 60; i++) { | |
var newNumber = Math.random() * (max-min) + min; | |
dataset.push(newNumber); | |
} | |
document.write(JSON.stringify(dataset)); | |
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment