1// create empty array in javascript
2let empty_array = []
3
4// check empty is Array and then check array length
5if(Array.isArray(empty_array) && empty_array.length){
6
7 // if empty_array is a array and empty_array has a length
8 console.log("Array is not empty")
9 // iterate an array
10
11} else {
12 // either empty_array is empty
13 console.log("Empty Array")
14}
15// result => Empty Array