+ 1
How can i add my 2 JavaScript files in sololearn
I need a project on my laptop and I want to share it on solo learn but I had a folder called JS that has two JavaScript files but I don't know how I can add the 2 to my project
6 Answers
+ 2
With your code as is, you should remove line 35 of HTML tab and wrap the code in the JS tab within the onload handler as suggested.
In this case, using window.onload inside of HTML you are essentially hiding the money object from the rest of your script, hence the fetching issues.
https://code.sololearn.com/WQH4atPEiFG6/?ref=app
There is also a syntax error at line 35, missing parentheses behind the function keyword.
+ 2
You can put both script contents in the Javascript tag.
+ 2
Yes, I found your thread again :)
Try to put this around all your js:
window.onload = function() {
// here your js
}
If you do that there is still an issue with fetching the data from the url. Unfortunately, I don't know how to fix that.
0
Oh ok thanks
0
https://code.sololearn.com/WXNHRoBTtb0m/?ref=app
Lisa this is the code but it doesn't work here it works perfectly fine on my browser but it doesn't work here
0
Oh ok thanksđ€ČđŸ