export function javascript

JavaScript
// module "mon-module.js"
export default function cube(x) {
  return x * x * x;
}

Source

Also in JavaScript: