re: JavaScript Basics Before You Learn React VIEW POST

FULL DISCUSSION
 

Hey, great article, I knew most of this, but the part of modules have clarified me all I didn't have end up understanding.

BTW, I think there is an error here, no?

// in util.js
export default function times(x) {
return x * x;
}
// in app.js
export k from './util.js';
console.log(k(4)); // returns 16

That second export should be an import, shouldn't be?

 

ah yes, thanks for the correction Alex :) glad could help you learn something

code of conduct - report abuse