js exports export


function say(){ console.log("say hello11") } function hi(){ console.log("say hi11") } //commonjs-----exports----- //module.exports.say=say //const sayhi=require(‘./crc32.js‘) sayhi.say() //module.exports.say=say //const sayhi=require(‘./crc32.js‘) sayhi() //const sayhi=require(‘./crc32.js‘) sayhi() sayhi.say() sayhi.hi() // exports.say=say // exports.hi=hi //------export------- //const num=20; //export default num; //import num from ‘./crc32‘ export const say1=function(){ console.log("say1 hello") } function hi1(){ console.log("say111hi11") } export {hi1} //import { say1, hi1 } from ‘./crc32‘
//https://blog.csdn.net/qq_31967569/article/details/82461499

  

js exports export

原文:https://www.cnblogs.com/howhy/p/15348640.html

以上是js exports export的全部内容。
THE END
分享
二维码
< <上一篇
下一篇>>