-
is there a difference in splice and slice having hard time to understand and new to coding |
Beta Was this translation helpful? Give feedback.
Answered by
TianMeds
Nov 28, 2022
Replies: 1 comment 2 replies
-
The splice() method adds and removes array elements while The slice() method selects from a given start, up to a (not inclusive) given end. |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
HirayaEs
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The splice() method adds and removes array elements while The slice() method selects from a given start, up to a (not inclusive) given end.
The slice has a syntax of the array.slice(start, end) and for splice array.splice(index, howmany, item1, ....., itemX) you can visit It in the w3school if your a beginner