I want to turn this
function sum(a, b) {
return a + b;
}
module.exports = sum;
into es6. I have babel preset 2015 but I still got error when I try to run below code:
export default sum(a, b) => {
return a + b;
}
Anything wrong with my es6 function and export?