A

Admin • 828.03K Points
Coach

Q. What is the use of the slice() method in arrays?

  • (A) Returns a shallow copy of a portion of an array
  • (B) Removes items from the array
  • (C) Adds new items into the array
  • (D) Sorts array elements
  • Correct Answer - Option(A)
  • Views: 10
  • Filed under category JavaScript
  • Hashtags:

Explanation by: Admin
slice() does not change the original array and returns selected elements.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.