Which three components are combined to form a bridge ID?
Which three components are combined to form a bridge ID? port ID IP address extended system ID MAC address bridge priority cost Answers Explanation & Hints: The three components that…
Which three components are combined to form a bridge ID? port ID IP address extended system ID MAC address bridge priority cost Answers Explanation & Hints: The three components that…
Examine the following code: let car = {make: "Citroen", model: "DS"}; for (let f in car) console.log(f); What will appear on the console as a result? "Citroen" "DS" "make: Citroen"…
Examine the following code: for (let a = 4; a < 4; a++) { console.log("test"); } How many times will "test" be displayed in the console as a result of…
Examine the following code: for (let a = 5; a > 1; a--) { console.log(a); } ; Which statement can replace the for from the example above? let a =…
We store an array of animal names in the animals variable (e.g. let animals = ["dog", "cat", "hamster", "rabbit"];). Which of the following statements will display exactly two names from the array? for (let i…
Analyze the following code: for (let x = 10; x > 1; x -= 2) console.log("hello"); How many times will "hello" be displayed in the console as a result of…
Analyze the following code: let a = 10; do { console.log(a--); } while (a > 3); Which statement can replace the do ... while from the example above? while (a > 4) …
If we want to display all the elements of the days array in reverse order (starting from the last element) then we can do this using the statement: for(let i =…
Which of the following loop instructions is intended only to loop through all the keys of the indicated object? for ... of if ... else for ... in do ...…
Which of the following is not a loop instruction in JavaScript? for ... in do ... while for ... of if ... else Explanation & Hint: The "if ... else"…
Which sequence of if ... else statements is incorrect? if ... else ... if ... else if ... if ... else if ... else if... if ... else ... else if ... Explanation…
Analyze the code below: if (counter === 10) { console.log("abc"); } How can we write the same condition using the switch statement? case(counter) { switch 10: console.log("abc") }; switch(counter)…
The switch statement: allows you to change the program mode to debug mode. is a conditional statement that allows different actions to be taken depending on the value stored in the indicated…
Review the following code snippet: if (counter <= 10 && show === false) { console.log("test"); } What values can the counter and show variables have so that the console displays "test" as a result…
Review the following code: if (counter <= 10) { if (counter >= 10) { console.log(1); } } We can replace it using: if (true) console.log(1); if (false) console.log(1); if (counter >= 10)…
Review the following code: let x = 100; if (x < 100) x = 20; console.log(x) What will be displayed in the console as a result of its execution? nothing 100 …
Which of the following operators is a ternary one? An assignment operator =. A conditional operator ? :. A typeof operator. An increment operator ++. Explanation & Hint: The ternary operator in JavaScript is represented by the ? and : symbols. It is…
We want to rewrite the following code snippet using the conditional operator: let name; if (test) { name = "Alice"; } else { name = "Bob"; } Which notation is…
The condition if (!a) can be replaced by the condition: if (a); if (!!a); if (a === false); if (a == false); Explanation & Hint: The condition if (!a) in JavaScript can…
The condition if( a >= 0 ) can be replaced by the condition: if (a > 0 || a == 0); if (a > 0 && a == 0); if (0 <…