Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR TYPESCRIPT

typescript splice

var arr = ["orange", "mango", "banana", "sugar", "tea"];  
var removed = arr.splice(2, 0, "water");  
console.log(arr);  // orange,mango,water,banana,sugar,tea 
console.log(removed); // banana
 
PREVIOUS NEXT
Tagged: #typescript #splice
ADD COMMENT
Topic
Name
3+1 =