COMPLETE QUESTIONS AND CORRECT
ANSWERS
◉ javaScript- comparison operators. Answer: <, >, <=, >=, ===, ==, !=,
!==
◉ javascript- short circuiting. Answer: the evaluation of an expression
from left to right with || and && operators. If the condition is met and
the rest of the conditions won't affect the already evaluated result, the
expression will short-circuit and return that result (value).
◉ javascript ===. Answer: compares to see if two variables are the
same. the variables must be equal in both value and type.
◉ javascript- solve this:
let a = 3;
let b = "3";
console.log(a==b);
console.log(a===b);
, console.log(a!==b);. Answer: true because javascript automatically
parses strings in ==
false because the type of variable is not the same
true because this is saying that the variables are not the same type
◉ javascript- What are the different types of loops. Answer: while, do-
while, for
◉ javascript- what is the name and purpose of the first loop. Answer:
The pretest loop is used to test the program
◉ javascript ==. Answer: tests to see if the values of two variables are
equal. does not test for different variable types.
◉ javascript- what is the output if user types quit?
const HELLO = "hi";
const QUIT = "quit";
let option = HELLO;
while(option != QUIT){
option = prompt("hello. type 'quit' to quit.");
if(option ==HELLO){