Question about: Create an Export Fallback with export default

Tell us what’s happening:
Additionally, you cannot use export default with var , let , or const

Okay but what do i do then if i used a variable in combination with my function how does it act then? and what do i do if this problem arise??

Your code so far


function subtract(x, y) {
return x - y;
}

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.135 Safari/537.36.

Challenge: Create an Export Fallback with export default

Link to the challenge:

hey , the thing is you can export a function, variable, object, or any using export default only once
if you try to use export default syntax again , you will get an error.
you can still use normal export {variable, function} to export even after you use export default

1 Like