I want to reduce this array down to 5 numbers, but as evenly as possible. So I would need the start number, the end and then some in the middle. 

```
const range = [8000, 9000, 10000, 11000, 12000, 13000, 14000, 15000, 16000, 17000, 18000, 19000, 20000, 21000, 22000, 23000, 24000, 25000, 26000, 27000, 28000, 29000, 30000]

```

Basically the above array is a data set for a slider I have, I want to show the numbers below so the user can see where to slider the slider too, however there are too many numbers to display nicely. 

No idea how to do this, here is my attempt but is results in strangely spaced numbers due to not being even.

```
const steps = range[range.length - 1] / 5;
const start = range[0];
const stop = range[range.length - 1];

let marks = Array(Math.ceil((stop - start) / steps)).fill(start).map((x, y) => x + y * steps);
marks.push(stop);
console.log(marks);

```