Is an empty JavaScript array considered a string? When I try to do an increment operation on an empty array it returns "1"
. I am also curious why it doesn't run the catch block.
let x=[]
try {
x=x+1
} catch(err){
console.log(err)
}
console.log( typeof x, x);