I am new to using vuejs and js lets say I have an array
[0, 2, 10, 13.5, 20, 30, 10, 10]
I want to be able to get their percentage increase. So in this example I should get an array like this:
[400%, 35%, 48.1481%, 50%, -66.6667%, 0%]
How do I get this result? I saw some solutions like:
Get percentage value from difference between two arrays javascript
But in that example there are two arrays, in mine I only have one array