How do you add a new number to the array that are `Math.random()`

from the range -100 to +100, and then does + or - the random number it got and does the math on the previous number in the array before pushing it to the array?

**MY CODE**

```
var dataArr = [];
var newValue = 0;
for (let i = 0; i<151; i++) {newValue += Math.random() * 100 - 100} {
dataArr.push(newValue);
};
```

**Easier explanation**

A loop that gives the array 150 numbers.

First number (X) in the array is a random number (-100 to +100).

Next number (N) is (X -100 to +100) = random number from min = -100, max = 100, and makes the math. If minus then it subtracts x with it, if positive, then adds.

Third Number (B) is (N -100 to +100).

dataArr = [X, N, B]. (and it will loop till the array have got 150 numbers in it).

X, N, B is just the first 3 numbers as explanation.