JavaSript Question 6 (1 point) If you use a short-circuit operator to combine tw
ID: 3891129 • Letter: J
Question
JavaSript
Question 6 (1 point)
If you use a short-circuit operator to combine two expressions
Question 6 options:
both expressions are always evaluated
the second expression is evaluated only if it can affect the result
the first expression is evaluated only if it can affect the result
the result of each expression is reversed
Question 7 (1 point)
In the following statement, which expression is evaluated first?
var truth = !A || B && (C || D)
Question 7 options:
!A
B && (C || D)
C || D
!A || B
Save
Question 8 (1 point)
The condition for a while loop is tested
Question 8 options:
before the statements in the loop are executed
after the statements in the loop are executed
before and after the statements in the loop are executed
before or after the statements in the loop are executed, depending on how the condition is coded
Save
Question 9 (1 point)
If you want the block of code in a loop to be executed at least once, you would normally use
Question 9 options:
a while loop
a for loop
a do-while loop
either A or C
Save
Question 10 (1 point)
When the code that follows is executed, a message is displayed if the value the user enters
var userEntry = (prompt("Enter cost:");
if (isNaN(userEntry) || userEntry > 500 ) {
alert ("Message");
}
Question 10 options:
isn’t a number or the value in userEntry is more than 500
isn’t a number and the value in userEntry is more than 500
is a number or the value in userEntry is more than 500
is a number and the value in userEntry is more than 500
both expressions are always evaluated
the second expression is evaluated only if it can affect the result
the first expression is evaluated only if it can affect the result
the result of each expression is reversed
Question 7 (1 point)
In the following statement, which expression is evaluated first?
var truth = !A || B && (C || D)
Question 7 options:
!A
B && (C || D)
C || D
!A || B
Save
Question 8 (1 point)
The condition for a while loop is tested
Question 8 options:
before the statements in the loop are executed
after the statements in the loop are executed
before and after the statements in the loop are executed
before or after the statements in the loop are executed, depending on how the condition is coded
Save
Question 9 (1 point)
If you want the block of code in a loop to be executed at least once, you would normally use
Question 9 options:
a while loop
a for loop
a do-while loop
either A or C
Save
Question 10 (1 point)
When the code that follows is executed, a message is displayed if the value the user enters
var userEntry = (prompt("Enter cost:");
if (isNaN(userEntry) || userEntry > 500 ) {
alert ("Message");
}
Question 10 options:
isn’t a number or the value in userEntry is more than 500
isn’t a number and the value in userEntry is more than 500
is a number or the value in userEntry is more than 500
is a number and the value in userEntry is more than 500
Explanation / Answer
Q.6
the second expression is evaluated only if it can affect the result
Q7
!A
Q8
before and after the statements in the loop are executed
Q9
a do-while loop
Q10
isn’t a number or the value in userEntry is more than 500
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.