Salesforce JavaScript-Developer-I Exam Questions (Updated 2022) 100% Real Question Answers [Q82-Q107]

Share

Salesforce JavaScript-Developer-I Exam Questions (Updated 2022) 100% Real Question Answers

Pass Salesforce JavaScript-Developer-I Exam Quickly With TestValid


What is the duration, language, and format of Salesforce JavaScript-Developer-I Exam

  • This exam consists of 60 questions
  • Passing score 65%
  • There is a time limit of 105 minutes for the exam.
  • This exam is offered in only English.
  • The type of questions is Multiple Choice and situation-based questions.

Salesforce JavaScript-Developer-I Exam Syllabus Topics:

TopicDetails
Topic 1
  • Demonstrate awareness of type coercion and its effects
  • Given a block of code, analyze the variable scope and the execution flow
Topic 2
  • Apply fundamentals of object implementation to solve the business requirement
  • Utilize the Browser Dev Tools to investigate code behavior
Topic 3
  • Given a business requirement, utilize Events, event handlers and propagation
  • Given a specific scenario, distinguish truthy or falsey evaluations
Topic 4
  • Given a JavaScript module, give examples of how to use the module
  • Given a scenario, write code to create variables and initialize them correctly
Topic 5
  • Apply fundamentals of class implementation to solve the business requirement
  • Know the core Node.js modules and given requirements, infer which Node.js library
  • framework is a good solution
Topic 6
  • Given a JavaScript decorator, give examples of how to use the decorator
  • Use event loop and event monitor or determine loop outcomes

 

NEW QUESTION 82
Refer to the following code:

Which statement should be added to line 09 for the code to display 'The boat has a capacity of 10 people?

  • A. this.size = size;
  • B. ship.size size;
  • C. super.size = size;
  • D. super (size);

Answer: A

 

NEW QUESTION 83
A developer has a formatName function that takes two arguments, firstName and lastName and returns a string. They want to schedule the
function to run once after five seconds.
What is the correct syntax to schedule this function?

  • A. setTimeout ('formatName', 5000, 'John", "Doe');
  • B. setTimeout (formatName(), 5000, "John", "BDoe");
  • C. setTimeout (formatName('John', ''Doe'), 5000);
  • D. setTimout(() => { formatName("John', 'Doe') }, 5000);

Answer: A

 

NEW QUESTION 84
Given the following code:
Counter = 0;
const logCounter = () => {
console.log(counter);
);
logCounter();
setTimeout(logCOunter, 1100);
setInterval(() => {
Counter++
logCounter();
}, 1000);
What is logged by the first four log statements?

  • A. 0 1 1 2
  • B. 0 1 2 2
  • C. 0 1 2 3
  • D. 0 0 1 2

Answer: A

 

NEW QUESTION 85
A team that works on a big project uses npm to deal with projects dependencies.
A developer added a dependency does not get downloaded when they execute npm
install.
Which two reasons could be possible explanations for this?
Choose 2 answers

  • A. The developer missed the option --add when adding the dependency.
  • B. The developer added the dependency as a dev dependency, and
    NODE_ENV
    Is set to production.
  • C. The developer missed the option --save when adding the dependency.
  • D. The developer added the dependency as a dev dependency, and
    NODE_ENV is set to production.

Answer: B,C,D

 

NEW QUESTION 86
Considering the implications of 'use strict' on line 04, which three statements describe the execution of the code?
Choose 3 answers

  • A. z is equal to 3.14.
  • B. 'use strict' has an effect between line 04 and the end of the file.
  • C. 'use strict' is hoisted, so it has an effect on all lines.
  • D. 'use strict' has an effect only on line 05.
  • E. Line 05 throws an error.

Answer: A,D,E

 

NEW QUESTION 87
A developer creates a generic function to log custom messages in the console. To do this, the function below is implemented.
01 function logStatus(status){
02 console./*Answer goes here*/{'Item status is: %s', status};
03 }
Which three console logging methods allow the use of string substitution in line 02?

  • A. Log
  • B. Info
  • C. Assert
  • D. Error
  • E. Message

Answer: A,B,C

 

NEW QUESTION 88
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.parse and JSON.deserialize
  • C. JSON.serialize and JSON.deserialize
  • D. JSON.encode and JSON.decode

Answer: A

 

NEW QUESTION 89
A developer wants to set up a secure web server with Node.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?

  • A. const server =require('secure-server');
  • B. const https =require('https');
  • C. const http =require('http');
  • D. const tls = require('tls');

Answer: B

 

NEW QUESTION 90
bar, awesome is a popular JavaScript module. the versions publish to npm are:

Teams at Universal Containers use this module in a number of projects. A particular project has the package, json definition below.

A developer runs this command: npm install.
Which version of bar .awesome is installed?

  • A. 1.4.0
  • B. 1.3.1
  • C. 1.3.5
  • D. The command fails, because version 130 is not found

Answer: C

 

NEW QUESTION 91
Given the code below:
Setcurrent URL ();
console.log('The current URL is: ' +url );
function setCurrentUrl() {
Url = window.location.href:
What happens when the code executes?

  • A. The url variable has local scope and line 02 throws an error.
  • B. The url variable has global scope and line 02 executes correctly.
  • C. The url variable has local scope and line 02 executes correctly.
  • D. The url variable has global scope and line 02 throws an error.

Answer: B

 

NEW QUESTION 92
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. The test passes:

A different developer made changes to the behavior of sum3 to instead sum all of the number present In the array.
Which two results occur when running the 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 93
Given the following code:

What is the logged by the first four log statements?

  • A. 0 1 1 2
  • B. 0 1 2 2
  • C. 0 1 2 3
  • D. 0 0 1 2

Answer: A

 

NEW QUESTION 94
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. 2 1 4 3 5
  • B. 2 5 1 3 4
  • C. 1 2 4 3 5
  • D. 1 2 5 3 4

Answer: B

 

NEW QUESTION 95
Refer to the code below:

Considering the implementations of 'use strict' on line 04, which three statements describes the executes of the code? Choose 3 answers

  • A. 'use strict' has an effect only on line 05.
  • B. 'use strict' has an effect between line 04 and the end of the file.
  • C. 'use strict , is hoisted, so it has an effect on all lines.
  • D. Z is equal to 3,14.
  • E. Line 05 throws an error.

Answer: C,D,E

 

NEW QUESTION 96
Given the code below:
const copy = JSON.stringify([ new String(' false '), new Bollean( false ), undefined ]); What is the value of copy?

  • A. -- [ \"false\" , { } ]--
  • B. -- [ false, { } ]--
  • C. -- [ \"false\" ,false, null ]--
  • D. -- [ \"false\" , false, undefined ]--

Answer: C

 

NEW QUESTION 97
Which three browser specific APIs are available for developer to persist data between page loads?
Choose 3 answers

  • A. global variables
  • B. IIFEs
  • C. cookies
  • D. indexedDB
  • E. localStorage

Answer: B,D,E

 

NEW QUESTION 98
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');

Answer: A

 

NEW QUESTION 99
Given the requirement to refactor the code above to JavaScript class format, which class
definition is correct?

A)

B)

C)

D)

  • A. Option A
  • B. Option B
  • C. Option C
  • D. Option D

Answer: A

 

NEW QUESTION 100
Refer to the following code:

What is the output of line 11?

  • A. [1,2]
  • B. ["foo:1", "bar:2"]
  • C. ["bar", "foo"]
  • D. ["foo", "bar"]

Answer: D

 

NEW QUESTION 101
Refer to the code below:

A developer import a library that creates a web server. the imported library uses events and callback to start the server.
Which code should be inserted at line 03 to set up an event and start the web server?

  • A. server ( (port) => (
    Console.log ('Listening on' , port) ;
    }};
  • B. Server .start();
  • C. server( );
  • D. Server. on ('connet' , (port) => (
    Console.log (Listening on' port);
    }};

Answer: A

 

NEW QUESTION 102
There is a new requirement for a developer to implement a currPrice method that will return the current price of the item or sales..

What is the output when executing the code above

  • A. 50
    80
    50
    72
  • B. 50
    Uncaught TypeError: saleItem,desrcription is not a function
    50
    80
  • C. 50
    80
    72
  • D. 50
    80
    Uncaught Reference Error:this,discount is undefined
    72

Answer: A

 

NEW QUESTION 103
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. Window.name is assigned to 'hello' and the variable z remains undefined.
  • B. The z variable is assigned the correct object but this.name remains undefined.
  • C. Window.m is assigned the correct object.
  • D. The z variable is assigned the correct object.

Answer: A

 

NEW QUESTION 104
A developer has two ways to write a function:
Option A:
function Monster(){
this.growl = ()=>{
console.log('Grr!');
}
}
Option B:
function Monster(){};
Monster.prototype.growl = ()=>{
console.log('Grr!');
}
After deciding on an option, the developer creates 1000 monster objects.
How many growl methods are created with Option A and Option B?

  • A. 1 methods for both
  • B. 1000 for both
  • C. 1 for Option A, 1000 for Option B
  • D. 1000 for Option A, 1 for Option B

Answer: A

 

NEW QUESTION 105
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:

  • A. var1.toBoolean() && var2toBoolean()
  • B. var1 && var2
  • C. Boolean(var1 && var2)
  • D. Boolean(var1) && Boolean(var2)

Answer: C,D

 

NEW QUESTION 106
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?

  • A. Undefined Developer
  • B. Error: myFather.job is not a function
  • C. John Developer
  • D. John undefined

Answer: C

 

NEW QUESTION 107
......


Salesforce JavaScript Developer I Certification Path

You must get an idea of exactly what this certification is, before investing your valuable time, effort, or money in Salesforce. The demand and the need for Salesforce certified professionals are rapidly growing and so Salesforce JavaScript Developer I Certification is becoming more and more popular. Different types of online training sessions are provided such as Intellipaat 's online training sessions for the Salesforce JavaScript Developer I Qualification . It is instructor-led teaching by subject professionals working in major organizations. This style of training includes live sessions with the teacher, along with a forum where you can clear all your course-based doubts.

Self-paced sessions are also offered. This training mode involves pre-recorded video sessions. You can conveniently return to these talks and revisit the subjects you have skipped whether you have any difficulties with the lectures or have difficulty keeping up with the online meetings. You will also use these sessions to finish your exercise at your speed while you access these online lessons throughout your life.

 

Real Salesforce JavaScript-Developer-I Exam Questions [Updated 2022]: https://lead2pass.testvalid.com/JavaScript-Developer-I-valid-exam-test.html