freeCodeCamp: ES6: Use export to Reuse a Code Block - fails looking for exports keyword instead of export

Challenge Name

https://beta.freecodecamp.org/en/challenges/es6/use-export-to-reuse-a-code-block

Issue Description

When attempting to export the variable in two different methods, the challenge fails with “exports is not defined”

Browser Information

Browser Name, Version: Operating System: FireFox 57.0 (64-bit) and Chrome Version 63.0.3239.84 (Official Build) (64-bit) Mobile, Desktop, or Tablet: Laptop Windows 10 Professional 64-bit

Your Code



Method 1:

`"use strict()";
export const foo = "bar";
export const boo = "far";`

Method 2:

`"use strict()";
const foo = "bar";
const boo = "far";

export {foo, boo};`


Screenshot

Method 1: image

Method 2:

image

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 16 (1 by maintainers)

Most upvoted comments

[SOLVED] 👏 👋 👍

Put a space between “bar” and “=”

"use strict";
export const foo = "bar";
export const bar = "foo";

Problem

I think my code is correct but still, it gave me an error any suggestions? issue

This challenge along with others are broken. This is my solution and it doesn’t even do anything when I run the test: const export foo = “bar” const export bar = “foo”

I am leaving them for now until they’re fixed. Going to contact Quincy or whoever.

i tried this, and pass the test. “use strict”; export const foo = “bar”; //export { foo }; export const bar = “foo”;