+ 4
Help with a Code
https://code.sololearn.com/WggcUTYYPif0/?ref=app In this Code I'm trying to make a genetic algorithm. In JSANYWHERE it works just fine but in SoloLearn not ... why pls help.
2 ответов
+ 4
For JavaScript DOM access codes that init run from JS pane, is required to be callbacked by window.onload function due to codes of JS pane are executed in head tag before DOM elements are loaded.
var c; // declare global var here
window.onload = function() {
// put your init code here
// access var e.g. c global var
}
+ 2
thanks very much!