+ 1
Why is there a âSyntax Errorâ in my code?
8 Answers
+ 2
Not window.onLoad function()
No
It has to be written as
window.onload = function() {
+ 7
The console is telling you that there's a problem with your 1st line.
You're missing the =
window.onload = function ()
+ 4
I can do it, no problem.
For future reference, you can either email info@sololearn.com or in the app there's a feedback option.
I'll link this thread in my suggestion.
+ 2
Ugulberto SĂĄnchez
or if you want it shorter
onload =()=>{
//your code....
}
This problem comes up a lot of times. Is there really no way for the Sololearn team to defer the execution of the javascript tab by default?
+ 2
In case anyone is interested, particularly Bob_Li.
I've received an email from Sololearn saying the Devs are looking into it.
+ 1
Bob_Li
Could be a good suggestion to add it as boilerplate code in the tab.
Do you want to submit it?
+ 1
Ausgrindtube not sure how to.
You'd be doing everyone a big favor if you did it for us.đ
+ 1
I found out why, it is marked as answer