js中类的构造顺序

function g(config) { console.log("gg"); } function h() { console.log("hh"); } new g({ "xx": new h() }); /** ➜ work node test hh gg */ 先构造里面的h,在构造外面的g。node
相关文章
相关标签/搜索