Tell us what’s happening:
- The challenge description is incorrect; you reference “string_functions” and the hint says “string-functions”
- The challenge desdribes using “./” to reference the imported file in the same directory; the hint excludes that so would reference node_modules, not a local file
- Regardless, the hint code does not work, nor does my correct code.
Your code so far
import { capitalizeString } from “./string_functions”;
“use strict”;
capitalizeString(“hello!”);
Also does not work with 'string_functions" or with “./string-functions” or with “./string_functions”
import { capitalizeString } from "string-functions";
"use strict";
capitalizeString("hello!");
Your browser information:
User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36
.
Link to the challenge:
https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/es6/understand-the-differences-between-import-and-require