You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Uses CommonJS, AMD or browser globals to create a jQuery plugin.(function(factory){if(typeofdefine==='function'&&define.amd){// AMD. Register as an anonymous module.define(['jquery'],factory);}elseif(typeofmodule==='object'&&module.exports){// Node/CommonJSmodule.exports=function(root,jQuery){if(jQuery===undefined){// require('jQuery') returns a factory that requires window to// build a jQuery instance, we normalize how we use modules// that require this pattern but the window provided is a noop// if it's defined (how jquery works)if(typeofwindow!=='undefined'){jQuery=require('jquery');}else{jQuery=require('jquery')(root);}}factory(jQuery);returnjQuery;};}else{// Browser globalsfactory(jQuery);}}(function($){$.fn.jqueryPlugin=function(){returntrue;};}));
JS解惑-那些经常用但是又叫不起名字的知识
Vanilla JS
世界上最轻量的
JavaScript
框架!字面量(Literal Syntax)
字面量就是变量创建的一种简写方式。
匿名函数(Anonymous Function)
三元表达式(Conditional (ternary) Operator)
OR
操作符Short-Circuits
||
is the or operator short-circuits。立即执行函数(IIFE)
即函数的定义和执行同时进行。
IIFE
- Immediately Invoked Function Expression首尾加括号包裹函数体
或者
尾逗号(Trailing Comma)
UMD
相对协议URL(Protocol-Relative URL)
翻译成中文可以称之为:
相对协议URL
,即:省略路径前面的具体协议名,只保留//
。TypeScript
TypeScrip
t 是JavaScript
的类型的超集,它可以编译成纯JavaScript
,编译出来的JavaScript
可以运行在任何浏览器上,TypeScript
编译工具可以运行在任何服务器和任何系统上。(全文完)
The text was updated successfully, but these errors were encountered: