Skip to content

Latest commit

 

History

History
executable file
·
6 lines (5 loc) · 454 Bytes

File metadata and controls

executable file
·
6 lines (5 loc) · 454 Bytes

The splice() method a combination of the methods that add and remove elements from an array. The splice() method can remove a number of elements and insert elements into an array. The syntax and the function of the splice() method is shown below.

arrayname.splice(index, count, elements)

  • Removes count elements, starting from index position
  • Adds elements at position index
  • Returns a new array, containing the removed elements