0
I'm getting an error message on my Code Repo for game development with JavaScript
After I typed in the JS from the code repo (8.2), I got the following message: errror: uncaught ReferenceError: Window is not defined, Line one
10 Antworten
+ 1
Here is the code:
windows.onload=function(){
let btn = document.getElementById("jump");
let cpunt=0;
btn.onclick=function(){
count +=1;
}
}
+ 1
thanks
0
I fixed "windows " to window, now I'm getting error" uncaught syntax error: Unexpected token '{' ??? the curly brace is supposed to be there!
0
Same code as above
window.omload = function(){
let btn = document.getElementById("jump");
let count += 1;
btn.onclick = function(){
count += 1;
}
}
0
sorry that should have read onload, not omload!
0
I think I saw what I did. I jumped over and skipped th code line: let count=0;
0
window.onload = funnction(){
let btn = document.getElementById("jump");
let count = 0;
btn = onclick = function(){
count += 1;
}
}