What is the difference between slice and splice in JavaScript?

 Posted by Tsurendra690-29180 on 12/9/2015 | Category: JavaScript Interview questions | Views: 744 | Points: 40
Answer:

Slice
Slice is used to extract the elements of an array and returns the extracted elements in an new array.
Splice
Splice is used to add/remove the element to/from an array and returns the new array after added/removed.


Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response

More Interview Questions by Tsurendra690-29180