两个同级函数,如何通过匿名函数传参(传递局部变量)?
学习WebGL时才意识到的,代码如下:
function a() { let first = 1; let second = 2; let b = function () { c(first, second); } } function c(first, second) { console.log(first, second); }
学习WebGL时才意识到的,代码如下:
function a() { let first = 1; let second = 2; let b = function () { c(first, second); } } function c(first, second) { console.log(first, second); }