| 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: | hermione |
A developer publishes a new version of a package with new features that do not break backward compatibility. The previous version number was 1.1.3.
Following semantic versioning formats, what should the new package version number be?
Refer to the code below:
01 const server = require( ' server ' );
02
03 // Insert code here
A developer imports a library that creates a web server. The imported library uses events and callbacks to start the server.
Which code should be inserted at line 03 to set up an event and start the web server?
static delay = async delay = > {
return new Promise(resolve = > {
setTimeout(resolve, delay);
});
};
static asyncCall = async () = > {
await delay(1000);
console.log(1);
};
console.log(2);
asyncCall();
console.log(3);
Assume delay and asyncCall are in scope as functions.
What is logged to the console?
Function to test:
01 const sum3 = (arr) = > {
02 if (!arr.length) return 0;
03 if (arr.length === 1) return arr[0];
04 if (arr.length === 2) return arr[0] + arr[1] ;
05 return arr[0] + arr[1] + arr[2];
06 };
Which two assert statements are valid tests for this function?