I do not know why my code isn't working, would anyone be able to help?

I have been working through the course, "Game Development with JS," However, I have encountered a problem later in the course and i cannot figure out why my code will not work, i am only a novice so i am completely baffled. https://code.sololearn.com/cQ71Y09udRDH/?ref=app

7th Feb 2023, 9:52 AM
Luke Tompkins
Luke Tompkins - avatar
5 Answers
+ 6
Why are you using a Java compiler for a Javascript code? Did you maybe accidently think they were the same language?
7th Feb 2023, 10:21 AM
Justice - avatar
+ 3
Dude it's Ur code is JavaScript! But u have used it inside java compiler...
7th Feb 2023, 11:39 AM
•Đคяк รтяεคм 𝅘𝅥𝅮 ᴺ•ᵀ•ᴬˢᵘʳᵃᵖᵖᵘˡᶦ
•Đคяк รтяεคм 𝅘𝅥𝅮 ᴺ•ᵀ•ᴬˢᵘʳᵃᵖᵖᵘˡᶦ - avatar
+ 3
When you create your code in the code playground, choose the WEB option to write the JavaScript under the tab there.
7th Feb 2023, 2:43 PM
Ausgrindtube - avatar
+ 1
Yeah, i apologize, i thought they were the same language. It was my first time trying to link it.
8th Feb 2023, 12:56 AM
Luke Tompkins
Luke Tompkins - avatar
+ 1
Java and JavaScript... easy mistake to make (html,javascript,css)< -- web stuff has nothing to do with java just similar name this is whats used to make colourful programs here in sololearn. and then there's (Java)<-- Nice language once you get the hang of it
9th Feb 2023, 1:05 AM
D_Stark - avatar