两个同级函数,如何通过匿名函数传参(传递局部变量)?

学习WebGL时才意识到的,代码如下:

function a() {
    let first = 1;
    let second = 2;
    let b = function () {
        c(first, second);       
    }      
}
function c(first, second) {
    console.log(first, second);   
}

 

posted @ 2021-01-12 10:47  Chill_寒  阅读(84)  评论(0编辑  收藏  举报