var funcHi = function() { 
    var a=6;
    var b=5;
    return a+b;
    };
var withBrace = funcHi();
var withoutBrace = funcHi;
console.log("With braces: "+withBrace)     //'Reference 1'
console.log("Without braces: "+withoutBrace)          //'Reference 2'
console.log("Without braces: "+withoutBrace())         //'Reference 3'
代码非常简单明了。对于“参考 1”和“参考 3”,控制台会显示 11,但我不清楚我们在哪里使用“参考 2”。对于“reference 2”,控制台将简单地显示完整的功能而不是显示 11。很多时候,我们使用“reference 2”的东西(例如 window.onload = initAll),但它有什么用处。
window.onload = initAll;  //What does it actually do? Why not 'window.onload = initAll()'
我不清楚它背后的概念。如果可能的话,有人能给我一个关于这件事的好课的链接吗?