what does an empty array look like in javascript code example
Example 1: javascript empty array
var arr1 = ['a','b','c','d','e','f'];
var arr2 = arr1; // Reference arr1 by another variable
arr1 = [];
console.log(arr2); // Output ['a','b','c','d','e','f']
Example 2: empty array javascript
// set array
arr = [1,2,4];
// empty array
arr = [];