Button Click Not Working Javascript Array Slice