Answer the question
In order to leave comments, you need to log in
The most stupid and easy question is how to add a value to a variable?
There is one problem, I created a variable and I can’t change its value to +2 in any way, that is:
var a = 0
a = +2
alert(a)
And the alert should output 2.
var ans;
varsum;
alert("Hello, this psychological test is for those who are not sure if they will ever win. The test consists of seventeen (17) questions."," ");
alert("OK = yes; Cancel = No"," ");
ans = confirm("1. I always know what I'll do if I fail, but I never talk about it. "," ");
if (ans==true){
sum += 2
alert(sum)
alert(ans)
}
ml>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question