Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

empty the integer array javascript

//remove integer value from array 
var ar = [1, 2, 3, 4, 5];
var arr = ar;
for (var i = ar.length; i > 0; i--) {
 arr.pop();
}
console.log(ar); 
console.log(arr);
 
PREVIOUS NEXT
Tagged: #empty #integer #array #javascript
ADD COMMENT
Topic
Name
6+2 =