If you use a short-circuit operator to combine two expressions…
Blog
Which of the following loops always executes its block of co…
Which of the following loops always executes its block of code at least once?
Which statements are equivalent to the if statements that fo…
Which statements are equivalent to the if statements that follow? if (pay >= 500) { tax_rate = 0.3; }if (pay >= 300 && pay < 500) { tax_rate = 0.2; }if (pay >= 100 && pay < 300) { tax_rate = 0.1; }
When the code that follows is executed, a message is display…
When the code that follows is executed, a message is displayed if the value the user enters is… const userEntry = prompt(“Enter cost:”);if (isNaN(userEntry) || userEntry > 500 ) { alert (“Message”);}
What value is returned by the following expression? !isNaN(1…
What value is returned by the following expression? !isNaN(12.345)
The equal to (==) and not equal to (!=) operators should…
The equal to (==) and not equal to (!=) operators should…
How many times will the while loop that follows be executed?…
How many times will the while loop that follows be executed?const months = 5;let i = 1;while (i < months) { console.log(i); i++;}
Code example 2-1let myAge = prompt(“How old are you?”);myAge…
Code example 2-1let myAge = prompt(“How old are you?”);myAge = parseInt(myAge);const newAge = 18 – myAge;alert(“You will be eligible to vote in ” + newAge + ” years”); Refer to code example 2-1. What would be displayed if the user enters 14 at the prompt and clicks OK?
To allow a user to enter a value into a dialog box, you can…
To allow a user to enter a value into a dialog box, you can use the…
Which of the following statements about whitespace is true?
Which of the following statements about whitespace is true?