9.
Considering the following code segment:
if ( num <0) {
alert(“It’s a negative num.”);
}
else {
alert(“It’s a non-negative num.”);
}
What will be displayed if num=0?
It’s a positive num.
It’s a non-negative num.
It’s a zero.
Nothing will be displayed.
10.
Considering the following code segment:
if(x>y) {
y=x;
}
else if (x == y){
x=1000;
}
else{
y =100;
}
alert ( ‘x=’ + x + ‘, y = ‘+y);
Given x=0 and y=5, what will be displayed?
x=0, y=5
x=0, y=100
x=1000, y=100
x=0, y=0
11.
If variable answer stores a Boolean value, then what are thepossible values for the variable?
0 or 1
“true” or “false”
true or false
any value
12.
Suppose variables roll1 = 3 and roll2 =4, which of the following will be evaluated as true?
roll1>3 || roll2
PayPal Gateway not configured
PayPal Gateway not configured