I know this could be quite simple for someone else but I can't think of any solution.
I have an array called breadcrumb with the following elements breadcrumb = [a, b, c, d]
I also know the index of b. How do I pop all other elements from the array after index of b in JavaScript. the final array should look like this
breadcrumb = [a, b]