Flash Cards 2023+

Please view on a computer as it's not optimized for mobile.

Click the Answer box to reveal the answer.

Question:

How does myArr.splice(i, j) differ from myArr.slice(i, j, myVar)?

Answer:

myArr.splice(i, j) - removes j elements from (and including) myArr index i

myArr.splice(i, j, myVar) - removes j elements from (and including) myArr index i then adds myVar in their place

Topic: