Feral Cat

Building, just because…

Javascript’s Splice

I recently spent a few hours trying to understand why my array was changing when using the splice method. I thought I’d save you some time and outline what I learned.

For Those of You Short on Time

Splice edits the original array!

// edit original array

Leave a Reply

Your email address will not be published. Required fields are marked *