Using JavaScript splice: Example of Adding and Removing Array Items