Salesforce JS-Dev-101 Certification Exam Sample Questions

JS-Dev-101 Braindumps, JS-Dev-101 Exam Dumps, JS-Dev-101 Examcollection, JS-Dev-101 Questions PDF, JS-Dev-101 Sample Questions, JavaScript Developer Dumps, JavaScript Developer Official Cert Guide PDF, JavaScript Developer VCE, Salesforce JavaScript Developer PDFWe have prepared Salesforce JavaScript Developer (JS-Dev-101) certification sample questions to make you aware of actual exam properties. This sample question set provides you with information about the JavaScript Developer exam pattern, question formate, a difficulty level of questions and time required to answer each question. To get familiar with Salesforce Certified JavaScript Developer exam, we suggest you try our Sample Salesforce JS-Dev-101 Certification Practice Exam in simulated Salesforce certification exam environment.

To test your knowledge and understanding of concepts with real-time scenario based Salesforce JS-Dev-101 questions, we strongly recommend you to prepare and practice with Premium Salesforce JavaScript Developer Certification Practice Exam. The premium Salesforce JavaScript Developer certification practice exam helps you identify topics in which you are well prepared and topics in which you may need further training to achieving great score in actual Salesforce Certified JavaScript Developer exam.

Salesforce JS-Dev-101 Sample Questions:

01. A developer copies a default settings object before applying a user's changes:
- const defaults = { theme: 'light', layout: { columns: 2 } };
- const userPrefs = { ...defaults };
- userPrefs.theme = 'dark';
- userPrefs.layout.columns = 3;
- console.log(defaults.theme, defaults.layout.columns);
What is logged to the console?
a) light 3
b) dark 2
c) light 2
d) dark 3
 
02. A developer needs a function total that accepts any number of numeric arguments, returns their sum, and returns 0 when called with no arguments. The code runs as an ES module.
Which three implementations meet the requirement?
(Choose 3 answers)
a) const total = (amounts) => amounts.reduce((sum, n) => sum + n, 0);
b) const total = function () { return Array.from(arguments).reduce((sum, n) => sum + n, 0); };
c) const total = () => Array.from(arguments).reduce((sum, n) => sum + n, 0);
d) const total = function (...amounts) { return amounts.length ? amounts.reduce((sum, n) => sum + n) : 0; };
e) const total = (...amounts) => amounts.reduce((sum, n) => sum + n, 0);
 
03. The following code runs in Node.js as a CommonJS script (node app.js):
- Promise.resolve().then(() => console.log('promise'));
- process.nextTick(() => console.log('tick'));
- console.log('sync');
In which order are the messages logged?
a) tick, sync, promise
b) sync, promise, tick
c) sync, tick, promise
d) promise, tick, sync
 
04. A developer is animating the width of a progress bar. Each update must run once per display refresh, just before the browser paints, and stop running while the tab is in the background.
Which call should schedule each update?
a) setInterval(step, 1000 / 60)
b) requestAnimationFrame(step)
c) requestIdleCallback(step)
d) setTimeout(step, 0)
 
05. A developer wrote the following unit test with the Node.js assert module:
- const result = parseQuery('team=ops&env=prod');
- assert.strictEqual(result, { team: 'ops', env: 'prod' });
The test fails even though parseQuery returns a new object with exactly those keys and values. assert.strictEqual compares its arguments with Object.is.
Which assertion verifies the contents of the returned object?
a) assert.equal(result, { team: 'ops', env: 'prod' });
b) assert.notStrictEqual(result, { team: 'ops', env: 'prod' });
c) assert.ok(result == { team: 'ops', env: 'prod' });
d) assert.deepStrictEqual(result, { team: 'ops', env: 'prod' });
 
06. Refer to the code below:
- console.log(null == 0, null >= 0, undefined == null);
What is logged to the console?
a) true true true
b) false false true
c) false true true
d) false true false
 
07. A developer is debugging a shopping cart and wants to inspect an array of line-item objects in the console as rows and columns, with one column per property.
- const cart = [{ sku: 'A1', qty: 2 }, { sku: 'B7', qty: 5 }];
Which statement displays the data this way?
a) console.table(cart);
b) console.group(cart);
c) console.dir(cart);
d) console.log(cart.join(', '));
 
08. A developer is building a Node.js HTTP endpoint that sends log archives to clients. Some archives are several gigabytes, and memory use per request must stay small however large the file is. Inside the request handler, res is the response and filePath names the archive.
Which implementation meets the requirement?
a) res.end(fs.readFileSync(filePath));
b) fs.createReadStream(filePath).pipe(res);
c) res.end(await fs.promises.readFile(filePath));
d) fs.readFile(filePath, (err, data) => res.end(data));
 
09. A login form at Harborview Credit Union submits credentials with fetch. Whatever the outcome, the script then runs window.location.href = '/home';. Testers report that the POST sometimes returns status 500, but when the developer opens the Network panel and submits, the POST entry is gone once /home loads.
Which two steps, used together, let the developer read the failed POST's status code and the request payload it sent?
(Choose 2 answers)
a) Enable Preserve log in the Network panel before submitting the form
b) Open Local Storage in the Application panel to read the request payload
c) Select the POST entry and open its Headers and Payload tabs
d) Enable Disable cache in the Network panel before submitting the form
e) Read the payload in the Console, where failed fetch calls print their request body
 
10. A subscription service calculates a renewal date one month after the start date:
- const renewal = new Date(2024, 0, 31);
- renewal.setMonth(renewal.getMonth() + 1);
- console.log(renewal.getMonth(), renewal.getDate());
What is logged to the console?
a) 1 29
b) 2 2
c) 1 31
d) 2 31

Answers:

Question: 01
Answer: a
Question: 02
Answer: b, d, e
Question: 03
Answer: c
Question: 04
Answer: b
Question: 05
Answer: d
Question: 06
Answer: c
Question: 07
Answer: a
Question: 08
Answer: b
Question: 09
Answer: a, c
Question: 10
Answer: b

Note: Please update us by writing an email on feedback@vmexam.com for any error in Salesforce Certified JavaScript Developer certification exam sample questions

Rating: 5 / 5 (75 votes)