[2023] JavaScript-Developer-I by Salesforce Developer Actual Free Exam Practice Test
Free Salesforce Developer JavaScript-Developer-I Exam Question
Salesforce JavaScript-Developer-I Exam Syllabus Topics:
| Topic | Details |
|---|---|
| Topic 1 |
|
| Topic 2 |
|
| Topic 3 |
|
| Topic 4 |
|
| Topic 5 |
|
| Topic 6 |
|
| Topic 7 |
|
NEW QUESTION 122
Refer to the code below:
What value can a developer expect when referencing o,js,secondCity?
- A. 'New York
- B. 'new york'
- C. An error
- D. Undefined
Answer: B
NEW QUESTION 123
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. multi
- B. all
- C. named
- D. default
Answer: C
NEW QUESTION 124
Refer to the code below:
In which sequence will the number be logged?
- A. 1 3 0 2 4
- B. 0 1 2 3 4
- C. 0 2 4 1 3
- D. 0 2 4 3 1
Answer: D
NEW QUESTION 125
Refer to the code below:
<html lang="en">
<table onclick="console.log(Table log');">
<tr id="row1">
<td>Click me!</td>
</tr>
<table>
<script>
function printMessage(event) {
console.log('Row log');
}
Let elem = document.getElementById('row1');
elem.addEventListener('click', printMessage, false);
</script>
</html>
Which code change should be made for the console to log only Row log when 'Click me! ' is clicked?
- A. Add event.stopPropagation(); to printMessage function.
- B. Add event.removeEventListener(); to window.onLoad event handler.
- C. Add.event.stopPropagation(); to window.onLoad event handler.
- D. Add event.removeEventListener(); toprintMessage function.
Answer: A
NEW QUESTION 126
Considering type coercion, What does the following expression evaluate to?
True + ) + '100 ' + null
- A. '3100null'
- B. 0
- C. '4100null'
- D. 1
Answer: C
NEW QUESTION 127
Refer to the code below:
let car1 = new Promise((_ ,reject)=> setTimeout(reject,2000,"Car1 crashed in")); let car2 = new Promise(resolve => setTimeout(resolve,1500,"Car2 completed")); let car3 = new Promise(resolve => setTimeout(resolve,3000,"Car3 completed")); Promise.race([car1,car2,car3])
.then(value=>{
let result = `${value} the race.`;
}).catch(err=>{
console.log('Race is cancelled.',err);
});
What is the value of result when promise.race execues?
- A. Car2 completed the race.
Answer: A
NEW QUESTION 128
A developer implements and calls the following code when an application state change occurs:
Const onStateChange =innerPageState) => {
window.history.pushState(newPageState, ' ', null);
}
If the back button is clicked after this method is executed, what can a developer expect?
- A. A navigate event is fired with a state property that details the previous application state.
- B. The page is navigated away from and the previous page in the browser's history is loaded.
- C. The page reloads and all Javascript is reinitialized.
- D. A popstate event is fired with a state property that details the application's last state.
Answer: B
NEW QUESTION 129
The developer has a function that prints "Hello" to an input name. To test this, thedeveloper created a function that returns "World". However the following snippet does not print " Hello World".
What can the developer do to change the code to print "Hello World" ?
- A. Change line 2 to console.log('Hello' , name() );
- B. Change line 7 to ) () ;
- C. Change line 5 to function world ( ) {
- D. Change line 9 to sayHello(world) ();
Answer: A
NEW QUESTION 130
A developer wrote the following code to test a sum3 function that takes in an array of numbers and returns the sum of the first three numbers in the array, and the test passes.
A different developer made changes to the behavior of sum3 to instead sum only the first two numbers present in the array.
Which two results occur when running this test on the updated sum3 function?
Choose 2 answers
- A. The line 05 assertion fails.
- B. The line 02 assertion fails.
- C. The line 05 assertion passes.
- D. The line 02 assertion passes.
Answer: A,D
NEW QUESTION 131
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 the new web framework Minimalist.Js. The lead developer wants to advocate for a more seasoned back-end framework that already has a community around it.
Which two frameworks could the lead developer advocate for?
Choose 2 answers
- A. Express
- B. Koa
- C. Angular
- D. Gatsby
Answer: A,C
NEW QUESTION 132
A developer wrote the following code:
The developer has a getNextValue function to execute after handleObjectvalue ( ), but does not want to execute getNextValues ( ) If an error occurs.
How can the developer change the code to ensure this behavior?
A)
B)
C)
- A. Option D
- B. Option C
- C. Option A
- D. Option B
Answer: A
NEW QUESTION 133
Which option is a core Node,js module?
- A. locate
- B. Path
- C. Ios
- D. Memory
Answer: B
NEW QUESTION 134
Universal Containers recently launched its new landing page to host a crowd-funding campaign. The page uses an external library to display some third-party ads. Once the page is fully loaded, it creates more than 50 new HTML items placed randomly inside the DOM, like the one in the code below:
All the elements includes the same ad-library-item class, They are hidden by default, and they are randomly displayed while the user navigates through the page.
- A. Use the browser console to execute a script that prevents the load event to be fired.
- B. Use the DOM inspector to prevent the load event to be fired.
- C. Use the DOM inspector to remove all the elements containing the class ad-library-item.
- D. Use the browser to execute a script that removes all the element containing the class ad-library-item.
Answer: D
NEW QUESTION 135
Refer to the following code block:
class Animal{
constructor(name){
this.name = name;
}
makeSound(){
console.log(`${this.name} is making a sound.`)
}
}
class Dog extends Animal{
constructor(name){
super(name)
this.name = name;
}
makeSound(){
console.log(`${this.name} is barking.`)
}
}
let myDog = new Dog('Puppy');
myDog.makeSound();
What is the console output?
- A. Puppy is barking
Answer: A
NEW QUESTION 136
A developer wants to create an object from a function in the browser using the code below:
Function Monster() { this.name = 'hello' };
Const z = Monster();
What happens due to lack of the new keyword on line 02?
- A. The z variable is assigned the correct object but this.name remains undefined.
- B. Window.name is assigned to 'hello' and the variable z remains undefined.
- C. The z variable is assigned the correct object.
- D. Window.m is assigned the correct object.
Answer: B
NEW QUESTION 137
Given the following code:
Let x =('15' + 10)*2;
What is the value of a?
- A. 0
- B. 1
- C. 2
- D. 3
Answer: C
NEW QUESTION 138
Given code below:
setTimeout (() => (
console.log(1);
). 0);
console.log(2);
New Promise ((resolve, reject )) = > (
setTimeout(() => (
reject(console.log(3));
). 1000);
)).catch(() => (
console.log(4);
));
console.log(5);
What is logged to the console?
- A. 1 2 5 3 4
- B. 2 1 4 3 5
- C. 2 5 1 3 4
- D. 1 2 4 3 5
Answer: C
NEW QUESTION 139
Refer to the code below:
After running this code, which result is displayed on the console?
- A. > 5
>- 1 - B. > 5
> Undefined - C. > True
> False - D. > 5
> 0
Answer: A
NEW QUESTION 140
At Universal Containers, every team has its own way of copying JavaScript objects. The code snippet shows an Implementation from one team:
What is the output of the code execution?
- A. Hello John Doe
- B. SyntaxError: Unexpected token in JSON
- C. Hello Dan
- D. Hello Dan Doe
Answer: B
NEW QUESTION 141
A developer uses a parsed JSON string to work with user information as in the block below:
Which two option access the email attributes in the object? Choose 2 answers
- A. userInformation. Get (''email'')
- B. userInformation(email)
- C. userInformation. email
- D. userInformation ( ''email'' )
Answer: C,D
NEW QUESTION 142
Refer to the code below:
What is the output after the code executes?
- A. undefined
- B. ReferenceError: assignment to undeclared variable ''Person''
- C. ReferenceError: eyeColor is not defined
- D. Developer
Answer: A
NEW QUESTION 143
A developer needs to debug a Node.js web server because a runtime error keeps occurring at one of the endpoints.
The developer wants to test the endpoint on a local machine and make the request against a local server to look at the behavior. In the source code, the server, js file will start the server. the developer wants to debug the Node.js server only using the terminal.
Which command can the developer use to open the CLI debugger in their current terminal window?
- A. node start inspect server,js
- B. node -i server.js
- C. node server,js inspect
- D. node inspect server,js
Answer: D
NEW QUESTION 144
......
For more info read reference:
Salesforce JavaScript-Developer-I Certification leaning site Salesforce JavaScript-Developer-Is Certification resources
Salesforce JavaScript-Developer-I Actual Questions and Braindumps: https://www.vceprep.com/JavaScript-Developer-I-latest-vce-prep.html
JavaScript-Developer-I dumps & Salesforce Developer sure practice dumps: https://drive.google.com/open?id=1E_xRhSXChMZ_vt4cWl6OzgId-Ll1G3S2