Https://www.codecademy.com/courses/introduction-to-javascript/lessons/requests-i/exercises/xhr-get-requests-iii

https://www.codecademy.com/courses/introduction-to-javascript/lessons/requests-i/exercises/xhr-get-requests-iii
why there is no export /import in helperFunctions.js file, ??
:confused:
pls guide is it because the index file contain the <script src="public/main.js"></script> <script src="public/helperFunctions.js"></script> ??
thank you !

Hey mega5255895484

why there is no export /import in helperFunctions.js file, ??

It’s because HelperFunctions.js does not contain code to be exported through ES6 modules.

is it because the index file contain…

Yes, exactly. When you load data in index.html it becomes part of the global scope, so it is accessible from elsewhere.
Specifically, in the HelperFunctions.js there are two arrow functions assigned to two const variables:
renderResponse and renderRawResponse.

You can test if you have access to these variables by going to the console section of the browser devtools and start typing their names, you’ll see that they come up as suggestions. This means they have been declared and those variables are available to you in the global scope to be called from the console.

Does this solve your doubt? :slight_smile: