Skip to content

Instantly share code, notes, and snippets.

@kenmazaika
Created April 9, 2016 13:59
Show Gist options
  • Save kenmazaika/425d0c790979ad8956747ec2e415fec4 to your computer and use it in GitHub Desktop.
Save kenmazaika/425d0c790979ad8956747ec2e415fec4 to your computer and use it in GitHub Desktop.

To run:

babel-node --presets es2015 runner.js

Output:

12 is 10 away from 22

const DIGITS = 10;
const adder = function(number) {
return number + DIGITS;
}
export default adder;
export {DIGITS};
import adder from './adder';
import {DIGITS} from './adder';
console.log("12 is " + DIGITS + " away from " + adder(12));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment