amd:AMD 的私有实现

时间:2024-07-06 14:08:07
【文件属性】:

文件名称:amd:AMD 的私有实现

文件大小:2KB

文件格式:ZIP

更新时间:2024-07-06 14:08:07

JavaScript

AMD 该模块实现了一个异步模块定义 API 例子 模块定义 amd . define ( 'MyCalculator' , [ ] , function ( ) { function MyCalculator ( ) { this . _value = 0 ; } MyCalculator . prototype . sum = function ( a , b ) { if ( typeof b === 'undefined' ) { this . _value += a ; } else { return a + b ; } } ; MyCalculator . prototyp


【文件预览】:
amd-master
----amd.js(6KB)
----README.md(801B)

网友评论