DEV Community

Discussion on: Slice() & Splice() in JavaScript

Collapse
 
dennishartrampf profile image
Dennis Hartrampf

In splice() usecase 2 fruits should be ['apple', 'mango', 'grape', 'banana', 'orange'] after splicing, shouldn't it?

Collapse
 
ip127001 profile image
Rohit Kumawat • Edited

You are right. Silly mistake, didn't maintain the first item 'apple' there.
Thanks for correction.

Collapse
 
dennishartrampf profile image
Dennis Hartrampf

My pleasure! ☺
Thanks for the nice article. It provides a good overview.