Tell us what’s happening:
Where is wrong?
Your code so far
"use strict";
export default subtract(7,4);
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36
.
Link to the challenge:
https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/es6/import-a-default-export
You have used ‘export’ instead of import. Here’s the instruction again:
In the following code, please import the default export, subtract, from the file “math_functions”, found in the same directory as this file.
Yes i have read it but I don’t understand what to do
just change the word ‘export’ to ‘import’
“use strict”;
import default subtract(7,4);
That ? But it tell me it is wrong
ok i see the problem
reset the code back to start (there’s a button to do it)
then go back and add a new line above the “use strict” line to import the subtract (leave the other code as-is).
it should look similar to this:
import add from "math_functions";
but instead of ‘add’ subtract
“use strict”;
import add from “math_functions”;
That?
SpadeX
#8
you need to clearly read and the solve Problem it’s simple!!
Here is correct solution just try it:blush:
“use strict”;
import subtract from “math_functions”;
subtract(7,4);
Yeah it is so simple OH my god thank you for helping


This is another simple way.
place the subtract inside a variable named math_functions & refer it to the import syntax like instructed.
"use strict";
const math_functions = subtract(7,4);
import subtract from "math_functions";