admin管理员组文章数量:1288078
I'm a new coder and I'm trying to interpret exports
in the following code:
exports.setCourse = function(c){
course = c;
Ti.API.debug('Setting course to ' + course.get('title'));
};
Whats the difference between exports.setCourse=function(c)
and just setCourse=function (c)
?
I'm a new coder and I'm trying to interpret exports
in the following code:
exports.setCourse = function(c){
course = c;
Ti.API.debug('Setting course to ' + course.get('title'));
};
Whats the difference between exports.setCourse=function(c)
and just setCourse=function (c)
?
- Read here monjs/specs/modules/1.0 – elclanrs Commented Jun 8, 2013 at 4:10
-
export
keyword details here. Currently it is not supported natively by any of the web-browsers. – RBT Commented May 1, 2017 at 6:43
1 Answer
Reset to default 9and wele to the wonderful world of coding -- I hope you enjoy it.
exports
is a node.js concept that declares the functions that your module makes available to code outside itself. It defines the module's interface.
Check out this StackOverflow answer...
本文标签: functionUsing quotExportsquot in JavascriptStack Overflow
版权声明:本文标题:function - Using "Exports." in Javascript? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741334773a2372978.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论