标签:display color imp fun struct pen cto 分享 close
‘use strict‘ export function showMe() { alert("es6"); }; class logging { constructor() { alert("es6 class"); } ha() { console.log("fff"); } } export const log = new logging(); #...... import { showMe, log } from ‘./es6.js‘; showMe(); log.ha();
‘use strict‘ function showMeC() { alert("commonjs"); } module.exports = { showMeC: showMeC, }; # ...... const { showMeC } = require(‘./commonjs.js‘); showMeC();
标签:display color imp fun struct pen cto 分享 close
原文地址:https://www.cnblogs.com/liuweimingcprogram/p/10238139.html