Salesforce certification preparation

JAVASCRIPT-DEVELOPER-I Practice Questions

Practice exam-style questions, check your answers, and review explanations and source references where they are available.

Exam
JAVASCRIPT-DEVELOPER-I
Provider
Salesforce
Full set
219 questions
Last Update Check
A developer wants to set up a secure web server withNode.js. The developer creates a directory locally called app-server, and the first file is app-server/index.js Without using any third-party libraries, what should the developer add to index.js to create the secure web server?
Answer options
Given the following code: Salesforce Javascript Developer I question What will be the first four numbers logged?
Answer options
Given two expressions var1 and var2. What are two valid ways to return the logical AND of the two expressions and ensure it is data type Boolean ? Choose 2 answers:
Answer options
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 2 answers
Answer options
Refer to code below: function Person() { this.firstName = ’John’; } Person.prototype ={ Job: x => ‘Developer’ }; const myFather = new Person(); const result=myFather.firstName + ‘ ‘ + myFather.job(); What is the value of the result after line 10 executes?
Answer options
A developer has an ErrorHandler module that contains multiple functions. What kind of export should be leveraged so that multiple functions can be used?
Answer options
Refer to the code below: Salesforce Javascript Developer I question What is the output of this function when called with an empty array?
Answer options
Refer to the code below: const event = new CustomEvent( //Missing Code ); obj.dispatchEvent(event); A developer needs to dispatch a custom event called update to send information about recordId. Which two options could a developer insert at the placeholder in line 02 to achieve this? Choose 2 answers
Answer options
Refer to the code below: Let foodMenu1 = [‘pizza’, ‘burger’, ‘French fries’]; Let finalMenu = foodMenu1; finalMenu.push(‘Garlic bread’); What is the value of foodMenu1 after the code executes?
Answer options
Refer the code below. x=3.14; function myfunction() { "use strict"; y=x; } z=x; myFunction();
Question 1 of 10

Source context

How this practice set is maintained

Maintained by the CertMage content team, this page loads questions from the exam dataset connected to its preparation resource. When an answer includes a supporting reference, it is shown with that answer so you can review the underlying vendor documentation.

Certification objectives, interfaces, and vendor services can change. Verify important details against the provider's current exam guide and documentation before your exam.

Scroll to Top