Showing posts with label JavaScript Types. Show all posts
Showing posts with label JavaScript Types. Show all posts

Tuesday, December 6, 2016

JavaScript Array Manipulation - Q&A

Question:

How do you remove an item from array? Give an example in code.

Answer

var arr = [1,2,3,4];
arr.splice(index, 1);