API Reference

Returns an array of the difference of each consecutive item in an array of numbers

function steps(arr: number[]): number[]

// Example:

steps([1, 3, 2, 5, -1]) //=> [2, -1, 3, -6]