0

I'm pretty new to JS and I'm trying to pull variables from other files. I am having an issue with this though, I am importing all the JS files in what I have seen (looked around a lot before asking this) to be correct order. I also have tried using object creation like "Filename moduleName = new Filename();" then calling things set in that instance like "moduleName.variableName" this does not work either. I have made a Repl.it for this issue and here it is: https://repl.it/EGfc/5

If anyone has any suggestions, questions, comments or concerns please ask or say them! Thanks, Aaron

1 Answer 1

1

Actually you have not declared the testForOne variable
in ContainsOne.js before the function. That's why it is undefined in Compile.js. I've made some changes in all your files to make clear how it works:

https://repl.it/EGfc/45

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks very much! This worked and makes sense! Have a good day!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.