编辑代码

//程序运行完成时一定要有输出语句,本工具才能正确展示运行结果。 
console.log("Hello JSRUN!   \n\n         - from NodeJS .");

function findCurrentItemByKey(info){
    let menu;
    info.forEach((item)=>{
        if(typeof item === 'object'){
            console.log('1')
           return findCurrentItemByKey(item)
        }else{
                if(item == 3){
                    console.log(item)
                menu = item
                return
            }
        }
    })
    return menu
}

let a = findCurrentItemByKey([1,[1,2,3],4,2])
console.log(a)