re: Modern JavaScript, 10 things you should be using, starting today VIEW POST

FULL DISCUSSION
 
export default (a,b) => return a *b;

You'd need curly braces to be able to use return here, or just get rid of it.

const math = {
  add(a,b) => a + b
  sub(a,b) => a - b 
  multiply(a,b) => a *b
}

This syntax isn't valid. You cannot use arrow functions with the shorthand notation.

 
code of conduct - report abuse