SOURCE

const api = {
    show(params) {
        console.log(params)
    }
}

function doApi(func = () => { }, params) {
    func(params)
}

doApi(api.show, 1)
console 命令行工具 X clear

                    
>
console