function getDiffs(arr) {
	let diffs = [];
	for (let i = 1; i < arr.length; i++) diffs.push(arr[i] - arr[i - 1]);
	return diffs;
}
This function is used to find difference between consecutive elements in an array.

@param {Array<number>} arr - The array from which differences need to be found.
@return {Array<number>} An array containing the differences between consecutive elements.