+ 2
Why is this not working sorry i just started codeing int score = 100;
This question is already answered
7 Antworten
+ 6
1. Is the language actually Javascript? Asking, because many get Java and Javascript confused thinking they are the same or are related.
2. If Javascript then no type is needed prior to the variable name, and it should be written usually in 1 of the following 3 ways, depending on your scope needs.
score = 100;
var score = 100;
let score = 100;
If you're not sure about the scope I recommend you 1st try using let then var. I don't recommend that you write code using variables with neither let or var as they result in global scope.
3. If Java or another language is what you intended, or this doesn't seem to resolve your issue,, then you'll need to supply more than just a single statement of your code and instead a minimal example.
+ 2
Thx
+ 2
In javascript you dont use int you can only use var, let and const
+ 1
My attempt is
int score = 100;
+ 1
Oh