Salesforce JavaScript-Developer-I Sample Questions

Question # 41

Adeveloper has an ErrorHandler module that contains multiple functions. What kind of export be leverages so that multiple functions can beused? 

A. Named
B. All
C. Multi
D. Default


Question # 42

A developer writes the code below to return a message to a user attempting to register a new username. If the username is available, a variable named nag is declared and assigned a value on line 03.

 
What is the value of msg when getAvailableabilityMessage (“newUserName”) is executed and get Availability (“newUserName”) returns true?

A. "msg is not defined"
B. "newUserName"
C. "User-name available"
D. undefined


Question # 43

Refer to the code below: Function Person(firstName, lastName,eyecolor) { this.firstName =firstName; this.lastName = lastName; this.eyeColor = eyeColor; } Person.job = ‘Developer’; const myFather = new Person(‘John’, ‘Doe’); console.log(myFather.job); What is the output after the code executes? 

A. ReferenceError: eyeColor is not defined
B. ReferenceError: assignment to undeclared variable “Person”
C. Developer
D. Undefined


Question # 44

Given HTML below: <div> <div id =”row-uc”>UniversalContainer</div> <div id =”row-aa”>Applied Shipping</div> <div id =”row-bt”> Burlington Textiles </div> </div> Which statement adds the priority = account CSS class to the universal Containers row ? 

A. Document .querySelector(‘#row-uc’).classes.push(‘priority-account’);
B. Document .queryElementById(‘row-uc’).addclass(‘priority-account’);
C. Document .querySelector(‘#row-uc’).classList.add(‘priority-account’);
D. Document .querySelectorALL(‘#row-uc’).classList.add(‘priority-account’);


Question # 45

Refer to the string below: const str = 'Salesforce'; Which two statements result in the word 'Sales'? Choose 2 answers 
 

A. str.substr(1, 5);
B. str.substr (0, 5);
C. str.substring (1, 5);
D. str.substring (0, 5);


Question # 46

A developer is leading the creation of a new web server for their team that will fulfill API requests from an existing client. The team wants a web server that runs on Node.Js, and they want to use thenew web framework Minimalist.Js. The lead developer wants to advocate for a more seasoned backend framework that already has a community around it. Which two frameworks could the lead developer advocate for? Choose 2 answers 

A. Gatsby
B. Angular
C. Express
D. Koa


Question # 47

A developer has an is Dog function that takes one argument cat. They want to schedule the function to run every minute. What is the correct syntax for scheduling this function? 
 

A. setInterval(isDog, 60000,'cat');


Question # 48

Refer to thefollowing code that imports a module named utils: import (foo, bar) from ‘/path/Utils.js’; foo() ; bar() ; Which two implementations of Utils.js export foo and bar such that the code above runs without error? Choose 2 answers 

A. // FooUtils.js and BarUtils.js existImport (foo) from ‘/path/FooUtils.js’;Import (boo) from ‘/path/NarUtils.js’;
B. const foo = () => { return ‘foo’ ; }const bar = () => { return ‘bar’ ; }export { bar, foo }
C. Export default class {foo() { return ‘foo’ ; }bar() { return ‘bar’ ; }}
D. const foo = () => { return ‘foo’;}const bar = () => {return ‘bar’; }Export default foo, bar;


Question # 49

developer removes the HTML class attribute from the checkout button, so now it is simply: <button>Checkout</button>. There is a test to verify the existence of the checkout button, however it looks fora button with class= “blue”. The test failsbecause no such button is found. Which type of test category describes this test? 

A. True positive
B. True negative
C. False positive
D. False negative


Question # 50

A developer has the following array of student test grades: Let arr = [ 7, 8, 5, 8, 9 ]; The Teacherwants to double each score and then see an array of the students who scored more than 15 points. How should thedeveloper implement the request? 

A. Let arr1 = arr.filter(( val) => ( return val > 15 )) .map (( num) => ( return num *2 ))
B. Let arr1 = arr.mapBy (( num) => ( return num *2 )) .filterBy (( val ) => return val > 15 )) ;
C. Let arr1 = arr.map((num) => num*2). Filter (( val) => val > 15);
D. Let arr1 = arr.map((num) => ( num *2)).filterBy((val) => ( val >15 ));


‹ First3456

Download All Questions PDF Check Customers Feedbacks