Quantcast
Channel: Active questions tagged javascript - Stack Overflow
Viewing all articles
Browse latest Browse all 138163

Smooth out array of increasing numbers

$
0
0

I have array of values like below

[100,190,290,395,500,800,700,800,600,1020]

Here I have sets of numbers with increasing numbers , but here there is two odd numbers when i plot it as graph , 800 and 600 , both should be replaced something like 610 and 900 respectively.

How can I achieve it.

Note : There will be maximum two odd numbers in a row , in total of minumum of 10 numbers


Viewing all articles
Browse latest Browse all 138163

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>