Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

js remove several elements from array

var arr1 = [1, 2, 3, 4, 5, 6];var arr2 = arr1; // Reference arr1 by another variable arr1 = [];console.log(arr2); // Output [1, 2, 3, 4, 5, 6]
Source by love2dev.com #
 
PREVIOUS NEXT
Tagged: #js #remove #elements #array
ADD COMMENT
Topic
Name
4+2 =