It may seem like an odd request, though I am not too good with JQuery/Javascript and there is no documentation on how to do this certain thing a customer needed.
I have this array: ["Value1", "Value2", "Value3","Value4"] and he wants it so that if he clicks on a button to delete e.g. value2, value3 and 4 are also deleted (all elements after) and for html to be changed on each one (so I can not just delete everything after, as html has to be changed in the process too).
I'm familiar with .each but it being used in such a situation seems rather slow and given JQuery's popularity, I would assume there is a better alternative or at least a method of employment of .each than looping through them all and checking their keys.