Reference error : exports is not defined //and more

I am currently in ES6 in the JS course.
I am in ES6: Create an Export Fallback with export default.
the code is

function subtract(x, y) {

  return x - y;


export default function(x,y)


  return x - y;


It gives an error same as the title.
The code is working well if I click submit then it works and I am passed.
I have been seeing this same error( in 2 something else was not defined) from last 4 lessons but in all of them the code is working.
I was wondering why is this happening

few lessons later again the error " require is not defined " is starting to come but the code is working fine

I’ve edited your post for readability. When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.

Please use the “preformatted text” tool in the editor (</>) to add backticks around text.

See this post to find the backtick on your keyboard.
Note: Backticks are not single quotes.


Oh okay I will keep that in mind.