JSE1 − Final Test Answers (JavaScript Essentials 1) 1. Examine the following code: let a = (n) => { return n > 2 ? n * a(n - 1) : 2 } a(6); What will appear on the console as a result? 6 720 120 4 2. Placing a debugger; statement in …
Read More »JavaScript Essentials 1
JSE1: Module 6 Test Answers (JavaScript Essentials 1)
JavaScript Essentials 1 – JSE1: Module 6 Test Answers 1. Which of the following is a syntax error? Attempting to call a non-existent function. Attempting to modify the value of a constant. Attempting to read a value from a variable that we have not previously declared. Missing parenthesis ending a …
Read More »JSE1: Module 5 Test Answers (JavaScript Essentials 1)
JavaScript Essentials 1 – JSE1: Module 5 Test Answers 1. Analyze the following code: let show = function () { console.log(test); } setTimeout(show, 2000); Its execution will cause: the console to display "test" after a 2 second delay. the console to display "test" after a 2000 second delay. the console …
Read More »JSE1: Module 4 Test Answers (JavaScript Essentials 1)
JavaScript Essentials 1 – JSE1: Module 4 Test Answers 1. Which sequence of if ... else statements is incorrect? if ... else if ... if ... else ... else if ... if ... else ... if ... else if ... else if... 2. Which of the following is not a …
Read More »JSE1: Module 3 Test Answers (JavaScript Essentials 1)
JavaScript Essentials 1 – JSE1: Module 3 Test Answers 1. The result of the operation !(true && false || true) will be: false 1 true null 2. The result of the comparison “abcd” > “Abcd” will be: 1 false true “abcd” 3. Analyze the code snippet: let nr = "1"; …
Read More »JSE1: Module 2 Test Answers (JavaScript Essentials 1)
JavaScript Essentials 1 – JSE1: Module 2 Test Answers 1. Analyze the code snippet: let name; let age; { let height; // 2 { // 2 let weight; // 1 // 2 console.log(name); // 1 // 2 } // 2 console.log(name); // 2 } We have access to the weight …
Read More »JSE1: Module 1 Test Answers (JavaScript Essentials 1)
JavaScript Essentials 1 – JSE1: Module 1 Test Answers 1. Using JavaScript, we want to display the word “test” in the console. What statement do we use to do this? console (log, “test”); log(“test”); console(“test”); console.log(“test”); 2. The basic toolkit needed to effectively develop JavaScript code consists of two elements: …
Read More »