Code
let min = -100;
let max = 100;
var dataArr = [];
var newValue = 0;
for (let i = 0; i<151; i++) {
newValue += Math.floor(Math.random() * (max - min + 1)) + min;
dataArr.push(newValue);
};
How do I refresh the loops(So it does it again) if it reaches (<= -1 or >= 1700)?
I need a if statement or something for this, but don’t know how to make it. Please help.