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

  

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-27
  • 2021-12-25
猜你喜欢
  • 2021-08-01
  • 2021-05-27
  • 2021-07-05
  • 2022-12-23
  • 2022-12-23
  • 2021-11-12
相关资源
相似解决方案