I was wondering if it is possible to do a "index--" after deleting an element in an Array while using the map function.
example:
arr.map((item, index) => item >= a && item <= b? item : arr.splice(index, 1));
after deleting the element at the said index, the index needs to be "index - 1" for the next iteration. is it possible to somehow manipulate the index in the map function?