var ary = [9,'kk',['kk',9],['uuu','hhh',['kkk',89]]]
function fo(arr,len) {
var flag = false
var arr1 = []
for (let i = 0; i< arr.length; i++) {
let isAry = Object.prototype.toString.call(arr[i]) == '[object Array]'
if (isAry) {
for(let j = 0; j< arr[i].length; j ++) {
arr1.push(arr[i][j])
}
flag = true
}
}
if (flag) {
len ++
return fo(arr1,len)
}else {
return len
}
}
let lens = fo(ary,1)
console.log(lens)