什么!功能(名称,定义)在javascript中意味着什么?

时间:2012-02-22 08:57:29

标签: javascript jquery node.js

  

可能重复:
  What does the exclamation mark do before the function?

所以morpheus脚本的开头就是这样:

!function (name, definition) {
  if (typeof define == 'function') define(definition)
  else if (typeof module != 'undefined') module.exports = definition()
  else this[name] = definition()
}('morpheus', function () {

为什么会有!

0 个答案:

没有答案
相关问题