programming-examples/js/Array/Write a JavaScript script to empty an array keeping the original..js

4 lines
85 B
JavaScript
Raw Normal View History

2019-11-15 12:59:38 +01:00
arr = [1, 3, 6, 3, -5];
console.log(arr);
arr.length = 0;
console.log(arr);