使用“出口”。在Javascript? [英] Using "Exports." in Javascript?

查看:110
本文介绍了使用“出口”。在Javascript?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是一名新编码员,我正在尝试在以下代码中解释 exports

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'));
};

exports.setCourse = function(c)只是 setCourse = function(c)

推荐答案

欢迎来到精彩的编码世界 - 我希望你喜欢它。

and welcome to the wonderful world of coding -- I hope you enjoy it.

exports 是一个节点。 js概念,声明模块可用于外部代码的函数。它定义了模块的接口。

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.

查看这个StackOverflow答案......

这篇关于使用“出口”。在Javascript?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆