人生如梦,一樽还酹江月。

08 2019 档案

摘要:CommonJs规范:module.exports、exports module.exports和exports 是commonJs的语法,大家熟知的node就是基于CommonJs语法设计的,node将每个文件视为一个拥有独立作用域链的模块, 每个木块的类,变量,函数等都是私有的,对其他文件不可见 阅读全文
posted @ 2019-08-22 17:55 Mrbabibo 阅读(336) 评论(0) 推荐(0)
摘要:当a && b 时,如果a为true,则返回b;如果a为false,则返回a。 当 a || b 时,如果a为true,则返回a;如果为false,则返回b。 例子: function a() 和 function b() a()&&b() 如果a执行成功返回true则执行b()返回b结果的值,如果 阅读全文
posted @ 2019-08-06 15:52 Mrbabibo 阅读(2621) 评论(0) 推荐(0)