When attempting to export the variable, the challenge fails with error "foo is exported.
bar is exported."
You need to add export before the variable as you are exporting variables here and not functions( check example 1).
According to the challenge, you are right. Now, it accepted the solution. But in the example, it is said that "Either approach is perfectly acceptable." why is the second approach not working?
@StubRavi Both the methods work but you are supposed to do it using the first one as instructed.
@QuincyLarson @Bouncey @raisedadead I think it will be better if the challenge accepted both types ie. foo should be exported using first method and bar should be exported using second method. Or the challenge should be split up into two sub-challenges.
Also there should be a space after bar and ‘=‘ .

Adding space before the equals sign allowed my test to pass but I thought I should mention this.
The spacing issue was fixed. Please close the issue @StubRavi
"use strict";
export const foo = "bar";
export const bar = "foo";