Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

js remove several elements from array

var ar = [1, 2, 3, 4, 5, 6];ar.length = 4; // set length to remove elementsconsole.log( ar ); // [1, 2, 3, 4]
Source by love2dev.com #
 
PREVIOUS NEXT
Tagged: #js #remove #elements #array
ADD COMMENT
Topic
Name
6+8 =