+ 3
What's wrong with this code it doesn't run in but it works fine in my PC weirdđ€
15 Answers
+ 4
If you run the code using SoloLearn mobile app, then you need to wrap your code in JS section inside "load" event handler.
Why? read here
https://www.sololearn.com/post/90825/?ref=app
window.onload = () =>
{
// your code goes here
}
I also noticed some typos in JS section. Are you sure it works fine in your PC? if it did, then I find it weird as well.
Line 22:
squar -> square
Line 58:
origBord -> origBoard
Line 78:
aiplayer -> aiPlayer
Line 81:
avialSpots -> availsSpots
Line 85, 87, 88, 99:
availSpots -> availsSpots
Line 92, 96:
result.score is not recognised
Line 101:
move.push(move) -> moves.push(move)
+ 1
That means the problem is with sololearn's platform not the code?
+ 1
Samuel,
By that statement, you claim the code (with all the typos in it) works fine in your PC? is that it?
By right those typos should trigger the generation of error messages in console. It is weird if the code with those typos runs just fine.
I guess you can now cease pointing finger at SoloLearn : )
+ 1
Samuel,
One lesson learned. Next time, please post the code in original form to avoid misunderstanding. Just copy/paste the code as is.
Good day ...
+ 1
Good game idea
0
Thanks for your feedback!
0
the typos are my mistake but null nah it works it doesn't show null error or any thing
0
Jah i think you right
0
Ipang: not with the typos the typos are my mistake when i wrote it on sololearn playground in my PC there are no typos everything is right no typo mistake
0
Okay!
thanks for your advice thouđ
0
Sup