Complete list of current Q & A>> Download Salesforce Certified JavaScript Developer I (SP21) – Quiz 1 / 15 Category: Salesforce Certified JavaScript Developer I (SP21) 1. A developer has an ErrorHandler module that contains multiple functions. What kind of export should be leveraged so that multiple functions can be used? A. default B. multi C. all D. named 2 / 15 Category: Salesforce Certified JavaScript Developer I (SP21) 2. Which JavaScript methods can be used to serialize an object into a string and deserialize a JSON string into an object, respectively? A. JSON.stringify and JSON.parse B. JSON.encode and JSON.decode C. JSON.serialize and JSON.deserialize D. JSON.parse and JSON.deserialize 3 / 15 Category: Salesforce Certified JavaScript Developer I (SP21) 3. A developer is wondering whether to use, Promise.then or Promise.catch, especially when a promise throws an error. Which two promises are rejected? (Choose two.) A. new Promise(() => {throw `Cool error here'}).then((null, error => console.error(error))); B. new Promise((resolve, reject) => {throw `Cool error here'}).catch(error => console.error(error)); C. Promise.reject(`Cool error here').then(error => console.error(error)); D. Promise.reject(`Cool error here').catch(error => console.error(error)); 4 / 15 Category: Salesforce Certified JavaScript Developer I (SP21) 4. Refer to the HTML below: <p> The current status of an Order: <span id=”status”> In Progress </span> </p> Which JavaScript statement changes the text `In Progress’ to `Completed’? A. document.getElementById("status").innerHTML = `Completed'; B. document.getElementById(".status").innerHTML = `Completed'; C. document.getElementById("#status").innerHTML = `Completed'; D. document.getElementById("status").Value = `Completed'; 5 / 15 Category: Salesforce Certified JavaScript Developer I (SP21) 5. Considering type coercion, what does the following expression evaluate to? true + 3 + `100′ + null A. `3100null' B. 104 C. 4100 D. `4100null' 6 / 15 Category: Salesforce Certified JavaScript Developer I (SP21) 6. can have one level, two levels, or more levels. myArray, Which statement flattens myArray when it can be arbitrarily nested? A. [].concat(…myArray); B. myArray.join(",").split(","); C. myArray.reduce((prev,curr) => prev.concat(curr), []); D. myArray.flat(Infinity); 7 / 15 Category: Salesforce Certified JavaScript Developer I (SP21) 7. Which two console logs output NaN? (Choose two.) A. console.log(parseInt(`two')); B. console.log(10 / Number(`5')); C. console.log(10 / 0); D. console.log(10 / `five'); 8 / 15 Category: Salesforce Certified JavaScript Developer I (SP21) 8. Which two options are core Node.js modules? (Choose two.) A. http B. worker C. exception D. iostream 9 / 15 Category: Salesforce Certified JavaScript Developer I (SP21) 9. Which statement accurately describes the behavior of the keywords? async/await A. The associated function sometimes returns a promise B. The associated function will always return a promise C. The associated class contains some asynchronous functions D. The associated function can only be called via asynchronous methods 10 / 15 Category: Salesforce Certified JavaScript Developer I (SP21) 10. A developer is debugging a web server that uses Node.js. The server hits a runtime error every third request to an important endpoint on the web server. The developer added a break point to the start script, that is at index.js at the root of the server’s source code. The developer wants to make use of Chrome DevTools to debug. Which command can be run to access DevTools and make sure the breakpoint is hit? A. node i index.js B. node –inspect index.js C. node inspect index.js D. node –inspect-brk index.js 11 / 15 Category: Salesforce Certified JavaScript Developer I (SP21) 11. Refer to the string below: const str = `Salesforce’; Which two statements result in the word `Sales’? (Choose two.) A. str.substring(0, 5); B. str.substr(1, 5); C. str.substring(1, 5); D. str.substr(0, 5); 12 / 15 Category: Salesforce Certified JavaScript Developer I (SP21) 12. Which three actions can be done using the JavaScript browser console?(Choose three.) A. View and change security cookies B. View and change the DOM of the page C. View, change, and debug the JavaScript code of the page D. Run code that is not related to the page E. Display a report showing the performance of a page 13 / 15 Category: Salesforce Certified JavaScript Developer I (SP21) 13. A test has a dependency on database.query. During the test, the dependency is replaced with an object called database with the method, query, that returns an array. The developer needs to verify how many times the method was called and the arguments used each time. Which two test approaches describe the requirement? (Choose two.) A. Integration B. White box C. Mocking D. Black box 14 / 15 Category: Salesforce Certified JavaScript Developer I (SP21) 14. A developer is trying to convince management that their team will benefit from using Node.js for a backend server that they are going to create. The server will be a web server that handles API requests from a website that the team has already built using HTML, CSS, and JavaScript. Which three benefits of Node.js can the developer use to persuade their manager? (Choose three.) A. Ensures stability with one major release every few years B. Uses non-blocking functionality for performant request handling C. Installs with its own package manager to install and manage third- party libraries D. Performs a static analysis on code before execution to look for runtime errors E. Executes server-side JavaScript code to avoid learning a new language 15 / 15 Category: Salesforce Certified JavaScript Developer I (SP21) 15. Which three statements are true about promises? (Choose three.) A. A promise has a .then() method B. A fulfilled or rejected promise will not change states C. The executor of a new Promise runs automatically D. A pending promise can become fulfilled, settled, or rejected E. A settled promise can become resolved Your score is 0% Restart quiz Send feedback