推荐关注
Meteor
JSLint - a JavaScript code quality tool
jsFiddle
D3.js
WebStorm
推荐书目
JavaScript 权威指南第 5 版
Closure: The Definitive Guide
sivacohan

这种代码怎么读?在require.js的文档里面看到的

  •  
  •   sivacohan ·
    PRO
    · Apr 1, 2013 · 4106 views
    This topic created in 4816 days ago, the information mentioned may be changed or developed.
    3 replies    1970-01-01 08:00:00 +08:00
    sivacohan
        1
    sivacohan  
    OP
    PRO
       Apr 1, 2013   ❤️ 1
    怎么贴gist啊?搞不清楚了
    zythum
        2
    zythum  
       Apr 1, 2013   ❤️ 1
    这里面的this 是 window。 就是 创建了一个局部变量 $ = window.jQuery. window.myExample 等于一个空方法。 外面那个是闭包自执行。
    Frannk
        3
    Frannk  
       Apr 3, 2013
    这样呢?
    (function (globle) {
    var $ = this.jQuery;

    globle.myExample = function () {};
    }(this));
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5905 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 47ms · UTC 02:06 · PVG 10:06 · LAX 19:06 · JFK 22:06
    ♥ Do have faith in what you're doing.