smartdown-gallery
Version:
Example Smartdown documents and associated resources that demonstrate various Smartdown features and serve as raw material for other Smartdown demos.
26 lines (19 loc) • 424 B
JavaScript
// lib.js
const PI = 3.1415926;
function sum(...args) {
log('sum', args);
return args.reduce((num, tot) => tot + num);
}
function mult(...args) {
log('mult', args);
return args.reduce((num, tot) => tot * num);
}
// private function
function log(...msg) {
console.log('ExtensionsES6Module: ', ...msg);
}
console.log('ExtensionsES6Module.js loading');
let note = {
note: ''
};
export { PI, sum, mult, note };