What statement would increase the value of a variable named nbr by one every time the statement was executed?
Front
nbr+=1
Back
Given the following declarations, write a nested if statement that alerts "Qualified" if the person's age is between the minimum age and the maximum age and "Nonqualified" otherwise.
var maxAge-30;
var minAge=21;
var age=23;
Front
if (maxAge>=age) {
if (minAge<=age)
alert ('Qualified');
}
else{
alert ('Nonqualified');
}
Back
What statement would increase the value of a variable named nbr by the value of a variable named amount every time the statement was executed?
Front
nbr=nbr+amount;
Back
Variables that are used on the right hand side of an assignment statement should always have...
Front
an initial value
Back
Given the following declarations, write a if statement without a nested if statement that alerts "Qualified" if the person's age is between the minimum age and the maximum age and "Nonqualified" otherwise.
var maxAge-30;
var minAge=21;
var age=23;
Front
if (maxAge>=age)&&(minAge<=age){
alert('Qualified')
}
else{
alert('Nonqualified');
}
Back
Given the following declarations, write a if statement that alerts "Qualified" if the person's age is between the minimum age and the maximum age and "Nonqualified" otherwise. Also alert "Too Old" or "Too Young".
var maxAge-30;
var minAge=21;
var age=23;
Front
if (maxAge,=age) {
alert('Nonqualified, Too Old');
}
if(minAge>=age){
alert('Nonqualified, Too Young');
}
else{
alert('Qualified');
}
Back
Rewrite the two if statements in the dice program using 2 statements that are not if statements.