| Exam Name: | Salesforce Certified JavaScript Developer (JS-Dev-101) | ||
| Exam Code: | JavaScript-Developer-I Dumps | ||
| Vendor: | Salesforce | Certification: | Salesforce Developer |
| Questions: | 147 Q&A's | Shared By: | brayden |
A developer needs to debug a Node.js web server because a runtime error keeps occurring at one of the endpoints.
The developer wants to test the endpoint on a local machine and make the request against a local server to look at the behavior. In the source code, the server.js file will start the server. The developer wants to debug the Node.js server only using the terminal.
Which command can the developer use to open the CLI debugger in their current terminal window?
(With corrected typing errors: node_inspect → node inspect, node_start_inspect → node start inspect.)
Refer to the code below:
01 let first = ' Who ' ;
02 let second = ' What ' ;
03 try {
04 try {
05 throw new Error( ' Sad trombone ' );
06 } catch (err) {
07 first = ' Why ' ;
08 throw err;
09 } finally {
10 second = ' When ' ;
11 }
12 } catch (err) {
13 second = ' Where ' ;
14 }
What are the values for first and second once the code executes?
Code:
01 let array = [1, 2, 3, 4, 4, 5, 4, 4];
02 for (let i = 0; i < array.length; i++) {
03 if (array[i] === 4) {
04 array.splice(i, 1);
05 i--;
06 }
07 }
What is the value of array after execution?
for (let number = 2; number < = 5; number += 1) {
// faster code statement here
}
Which statement meets the requirements to log an error when the Boolean statement evaluates to false?