0% found this document useful (0 votes)
22K views12 pages

Aindump2go Javascript-Developer-I Vce 2022-Mar-25 by Lawrence 103q Vce

The document advertises that the website Certshared is offering dumps for the Salesforce Certified JavaScript Developer I exam (JavaScript-Developer-I) with 157 practice questions and answers to help pass the exam with a 100% guarantee. It provides the URL https://www.certshared.com/exam/JavaScript-Developer-I/ to access the dumps.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
22K views12 pages

Aindump2go Javascript-Developer-I Vce 2022-Mar-25 by Lawrence 103q Vce

The document advertises that the website Certshared is offering dumps for the Salesforce Certified JavaScript Developer I exam (JavaScript-Developer-I) with 157 practice questions and answers to help pass the exam with a 100% guarantee. It provides the URL https://www.certshared.com/exam/JavaScript-Developer-I/ to access the dumps.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 12

Certshared now are offering 100% pass ensure JavaScript-Developer-I dumps!

https://www.certshared.com/exam/JavaScript-Developer-I/ (157 Q&As)

Salesforce
Exam Questions JavaScript-Developer-I
Salesforce Certified JavaScript Developer I

Guaranteed success with Our exam guides visit - https://www.certshared.com


Certshared now are offering 100% pass ensure JavaScript-Developer-I dumps!
https://www.certshared.com/exam/JavaScript-Developer-I/ (157 Q&As)

NEW QUESTION 1
A developer receives a comment from the Tech Lead that the code given below has error:
const monthName = ‘July’; const year = 2019;
if(year === 2019) { monthName = ‘June’;
}
Which line edit should be made to make this code run?

A. 01 let monthName =’July’;


B. 02 let year =2019;
C. 02 const year = 2020;
D. 03 if (year == 2019) {

Answer: A

NEW QUESTION 2
Refer to the code below:

What value can a developer expect when referencing o.js.secondCity?

A. Undefined
B. ‘ new york ’
C. ‘ New York ’
D. An error

Answer: B

NEW QUESTION 3
Refer to the code below: Let str = ‘javascript’; Str[0] = ‘J’;
Str[4] = ’S’;
After changing the string index values, the value of str is ‘javascript’. What is the reason for this value:

A. Non-primitive values are mutable.


B. Non-primitive values are immutable.
C. Primitive values are mutable.
D. Primitive values are immutable.

Answer: D

NEW QUESTION 4
A developer at Universal Containers creates a new landing page based on HTML, CSS, and JavaScript TO ensure that visitors have a good experience, a script
named personaliseContext needs to be executed when the webpage is fully loaded (HTML content and all related files ), in order to do some custom initialization.
Which statement should beused to call personalizeWebsiteContent based on the above business requirement?

A. document.addEventListener(‘’onDOMContextLoaded’, personalizeWebsiteContext);
B. window.addEventListener(‘load’,personalizeWebsiteContext);
C. window.addEventListener(‘onload’, personalizeWebsiteContext);
D. Document.addEventListener(‘‘’DOMContextLoaded’ , personalizeWebsiteContext);

Answer: B

NEW QUESTION 5
A developer creates an object where its properties should be immutable and prevent properties from being added or modified.
Which method shouldbe used to execute this business requirement ?

A. Object.const()
B. Object.eval()
C. Object.lock()
D. Object.freeze()

Answer: D

Guaranteed success with Our exam guides visit - https://www.certshared.com


Certshared now are offering 100% pass ensure JavaScript-Developer-I dumps!
https://www.certshared.com/exam/JavaScript-Developer-I/ (157 Q&As)

NEW QUESTION 6
Refer to code below:
Function muFunction(reassign){
Let x = 1;
var y = 1;
if( reassign ) {
Let x= 2;
Var y = 2;
console.log(x);
console.log(y);}
console.log(x);
console.log(y);}
What isdisplayed when myFunction(true) is called?

A. 2 2 1 1
B. 2 2 undefined undefined
C. 2 2 1 2
D. 2 2 2 2

Answer: C

NEW QUESTION 7
Which function should a developer use to repeatedly execute code at a fixed interval ?

A. setIntervel
B. setTimeout
C. setPeriod
D. setInteria

Answer: A

NEW QUESTION 8
Refer to the code below:
1 let car1 = new promise((_, reject) =>
2 setTimeout(reject, 2000, “Car 1 crashed in”));
3 let car2 = new Promise(resolve => setTimeout(resolve, 1500, “Car 2 completed”));
4 let car3 = new Promise(resolve => setTimeout (resolve, 3000, “Car 3 Completed”));
5 Promise.race([car1, car2, car3]) 06 .then(value => (
07 let result = $(value) the race. `; 08 ))
9 catch( arr => (
10 console.log(“Race is cancelled.”, err); 11 ));
What is the value of result when Promise.race executes?

A. Car 3 completed the race.


B. Car 1 crashed in the race.
C. Car 2 completed the race.
D. Race is cancelled.

Answer: C

NEW QUESTION 9
Given the following code: Let x =null; console.log(typeof x);
What is the output of the line 02?

A. “Null”
B. “X”
C. “Object”
D. “undefined”

Answer: C

NEW QUESTION 10
Refer to the code below: const addBy = ?
const addByEight =addBy(8); const sum = addBYEight(50);
Which two functions can replace line 01 and return 58 to sum? Choose 2 answers

A. const addBy = function(num1){ return function(num2){return num1 + num2;}


B. const addBy = function(num1){ return num1 + num2;}
C. const addBy = (num1) => num1 + num2 ;
D. const addBY = (num1) => (num2) => num1 + num2;

Answer: AD

NEW QUESTION 10
Refer to HTML below:
<p> The current status of an Order: <span id =”status”> In Progress </span> </p>.
Which JavaScript statement changes the text ‘In Progress’ to ‘Completed’ ?

Guaranteed success with Our exam guides visit - https://www.certshared.com


Certshared now are offering 100% pass ensure JavaScript-Developer-I dumps!
https://www.certshared.com/exam/JavaScript-Developer-I/ (157 Q&As)

A. document.getElementById(“status”).Value = ’Completed’ ;
B. document.getElementById(“#status”).innerHTML = ’Completed’ ;
C. document.getElementById(“status”).innerHTML = ’Completed’ ;
D. document.getElementById(“.status”).innerHTML = ’Completed’ ;

Answer: C

NEW QUESTION 12
The developer wants to test this code:
Const toNumber =(strOrNum) => strOrNum; Which two tests are most accurate for this code? Choose 2 answers

A. console.assert(toNumber(‘2’) ===2);
B. console.assert(Number.isNaN(toNumber()));
C. console.assert(toNumber(‘-3’) < 0);
D. console.assert(toNumber () === NaN);

Answer: AC

NEW QUESTION 14
Which three actions can be using the JavaScript browser console? Choose 3 answers:

A. View and change DOM the page.


B. Display a report showing the performance of a page.
C. Run code that is not related to page.
D. view , change, and debug the JavaScript code of the page.
E. View and change security cookies.

Answer: ACD

NEW QUESTION 18
Refer to code below:
Const objBook = { Title: ‘Javascript’,
};
Object.preventExtensions(objBook); ConstnewObjBook = objBook; newObjectBook.author = ‘Robert’;
What are the values of objBook and newObjBook respectively ?

A. [title: “javaScript”] [title: “javaScript”]


B. {author: “Robert”, title: “javaScript} Undefined
C. {author: “Robert”, title: “javaScript}{author: “Robert”, title: “javaScript}
D. {author: “Robert”}{author: “Robert”, title: “javaScript}

Answer: A

NEW QUESTION 23
Refer to code below:

What is the value of the result after line 10 executes?

A. Error: myFather.job is not a function


B. Undefined Developer
C. John undefined
D. John Developer

Answer: D

NEW QUESTION 28
At Universal Containers, every team has its own way of copyingJavaScript objects. The code
Snippet shows an implementation from one team:

Guaranteed success with Our exam guides visit - https://www.certshared.com


Certshared now are offering 100% pass ensure JavaScript-Developer-I dumps!
https://www.certshared.com/exam/JavaScript-Developer-I/ (157 Q&As)

What is the Output of the code execution?

A. Hello Dan Doe


B. Hello John DOe
C. TypeError: dan.name is not a function
D. TypeError: Assignment to constant variable.

Answer: C

NEW QUESTION 30
Refer to the code below:

Which two statements correctly execute the runParallel () function? Choose 2 answers

A. Async runParallel () .then(data);


B. runParallel ( ). done(function(data){ return data;});
C. runParallel () .then(data);
D. runParallel () .then(function(data) return data

Answer: BD

NEW QUESTION 32
Given the following code: Let x =(‘15’ + 10)*2;
What is the value of a?

A. 3020
B. 1520
C. 50
D. 35

Answer: A

NEW QUESTION 37
Refer to the code below? LetsearchString = ‘ look for this ’;
Which two options remove the whitespace from the beginning of searchString? Choose 2 answers

A. searchString.trimEnd();
B. searchString.trimStart();
C. trimStart(searchString);
D. searchString.replace(/*\s\s*/, ‘’);

Answer: BD

NEW QUESTION 42
Refer to the following object:

Guaranteed success with Our exam guides visit - https://www.certshared.com


Certshared now are offering 100% pass ensure JavaScript-Developer-I dumps!
https://www.certshared.com/exam/JavaScript-Developer-I/ (157 Q&As)

How can a developer access the fullName property for cat?

A. cat.fullName
B. cat.fullName()
C. cat.get.fullName
D. cat.function.fullName()

Answer: A

NEW QUESTION 46
Refer to the code below:

What is the output of this function when called with an empty array?

A. Returns 0
B. Throws an error
C. Returns 10
D. Returns NaN

Answer: C

NEW QUESTION 50
developer creates a new web server that uses Node.js. It imports aserver library that uses events and callbacks for handling server functionality.
The server library is imported with require and is made available to the code by a
variable named server. The developer wants to log any issues that the server has while booting up.
Given the code and the information the developer has, which code logs an error at boost with an event?

A. Server.catch ((server) => { console.log(‘ERROR’, error);});


B. Server.error ((server) => { console.log(‘ERROR’, error);});
C. Server.on (‘error’, (error) => { console.log(‘ERROR’, error);});
D. Try{server.start();} catch(error) { console.log(‘ERROR’, error);}

Answer: C

NEW QUESTION 53
Refer to code below: console.log(0);
setTimeout(() => ( console.log(1);
});
console.log(2); setTimeout(() => { console.log(3);
), 0);
console.log(4);
In which sequence will the numbers be logged?

A. 01234
B. 02431
C. 02413
D. 13024

Answer: C

NEW QUESTION 57
A developer creates a class that represents a blog post based on the requirement that a Post should have a body author and view count.
The Code shown Below: ClassPost {
// Insert code here This.body =body This.author = author;
this.viewCount = viewCount;
}
}
Which statement should be inserted in the placeholder on line 02 to allow for a variable to be set to a new instanceof a Post with the three attributes correctly
populated?

A. super (body, author, viewCount) {

Guaranteed success with Our exam guides visit - https://www.certshared.com


Certshared now are offering 100% pass ensure JavaScript-Developer-I dumps!
https://www.certshared.com/exam/JavaScript-Developer-I/ (157 Q&As)

B. Function Post (body, author, viewCount) {


C. constructor (body, author, viewCount) {
D. constructor() {

Answer: C

NEW QUESTION 61
Universal Containers (UC) just launched a new landing page, but users complain that the website is slow. A developer found some functions any that might cause
this problem. To verify this, the developer decides to execute everything and log the time each of these three suspicious functions consumes.
Which function can the developer use to obtain the time spent by every one of the three functions?

A. consol
B. timeLog ()
C. console.timeStamp ()
D. console.trace()
E. console.getTime ()

Answer: A

NEW QUESTION 66
A developer is asked to fix some bugs reported by users. Todo that, the developer adds a breakpoint for debugging.
Function Car (maxSpeed, color){ This.maxspeed =masSpeed; This.color = color;
Let carSpeed = document.getElementById(‘ CarSpeed’); Debugger;
Let fourWheels =new Car (carSpeed.value, ‘red’);
When the code execution stops at the breakpoint on line 06, which two types of information are available in the browser console ?
Choose 2 answers:

A. The values of the carSpeed and fourWheels variables


B. A variable displaying the number of instances created for theCar Object.
C. The style, event listeners and other attributes applied to the carSpeed DOM element
D. The information stored in the window.localStorage property

Answer: CD

NEW QUESTION 69
Refer to the code below:
01 const server = require(‘server’);
02 /* Insert code here */
A developer imports a library that creates a web server.The imported library uses events and callbacks to start the servers
Which code should be inserted at the line 03 to set up an event and start the web server ?

A. Server.start ();
B. server.on(‘ connect ’ , ( port) => { console.log(‘Listening on ’ , port);})
C. server()
D. serve(( port) => (
E. console.log( ‘Listening on ’, port) ;

Answer: B

NEW QUESTION 71
Refer to the code below:

Why does the function bar have access to variable a ?

A. Inner function’s scope


B. Hoisting

Guaranteed success with Our exam guides visit - https://www.certshared.com


Certshared now are offering 100% pass ensure JavaScript-Developer-I dumps!
https://www.certshared.com/exam/JavaScript-Developer-I/ (157 Q&As)

C. Outer function’s scope


D. Prototype chain

Answer: C

NEW QUESTION 73
is below:
<input type=”file” onchange=”previewFile()”>
<img src=”” height=”200” alt=”Image Preview…”/> The JavaScript portion is:
1 function previewFile(){
2 const preview = document.querySelector(‘img’);
3 const file = document.querySelector(‘input[type=file]’).files[0]; 04 //line 4 code
05 reader.addEventListener(“load”, () =>{ 06 preview.src = reader.result;
7 },false);
8 //line 8 code
9}
In lines 04 and 08, which code allows the user to select an image from their local computer , and to display the image in the browser?

A. 04 const reader = new File();08 if (file) URL.createObjectURL(file);


B. 04 const reader = new FileReader();08 if (file) URL.createObjectURL(file);
C. 04 const reader = new File();08 if (file) reader.readAsDataURL(file);
D. 04 const reader = new FileReader();08 if (file) reader.readAsDataURL(file);

Answer: D

NEW QUESTION 76
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. Changeline 7 to ) () ;
B. Change line 2 to console.log(‘Hello’ , name() );
C. Change line 9 to sayHello(world) ();
D. Change line 5 to function world ( ) {

Answer: B

NEW QUESTION 77
Refer to the code below: Function changeValue(obj) { Obj.value =obj.value/2;
}
Const objA = (value: 10);
Const objB = objA; changeValue(objB); Const result = objA.value;
What is the value of result after the code executes?

A. 10
B. Nan
C. 5
D. Undefined

Answer: C

NEW QUESTION 81
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.


B. The z variable is assigned the correct object but this.name remains undefined.
C. Window.name is assigned to ‘hello’ and the variable z remains undefined.
D. Window.m is assigned the correct object.

Answer: C

Guaranteed success with Our exam guides visit - https://www.certshared.com


Certshared now are offering 100% pass ensure JavaScript-Developer-I dumps!
https://www.certshared.com/exam/JavaScript-Developer-I/ (157 Q&As)

NEW QUESTION 84
Refer to the following code:

What is returned by the function call on line 13?

A. Undefined
B. Line 13 throws an error.
C. ‘Undefined values!’
D. ‘Null value!’

Answer: A

NEW QUESTION 85
Refer to the code below:
Const resolveAfterMilliseconds = (ms) => Promise.resolve ( setTimeout (( => console.log(ms), ms ));
Const aPromise = await resolveAfterMilliseconds(500); Const bPromise = await resolveAfterMilliseconds(500); Await aPromise, wait bPromise;
What is the result of runningline 05?

A. aPromise and bPromise run sequentially.


B. Neither aPromise or bPromise runs.
C. aPromise and bPromise run in parallel.
D. Only aPromise runs.

Answer: B

NEW QUESTION 90
Which option is a core Node,js module?

A. Path
B. Ios
C. Memory
D. locate

Answer: A

NEW QUESTION 94
A developer has code that calculates a restaurant bill, but generates incorrectanswers while testing the code:
function calculateBill ( items ) { let total = 0;
total += findSubTotal(items); total += addTax(total);
total += addTip(total); return total;
}
Which option allows the developer to step into each function execution within calculateBill?

A. Using the debugger command on line 05.


B. Using the debugger command on line 03
C. Calling the console.trace (total) method on line 03.
D. Wrapping findSubtotal in a console.log() method.

Answer: A

NEW QUESTION 99
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 0 1 2
B. 0 1 2 3
C. 0 1 1 2

Guaranteed success with Our exam guides visit - https://www.certshared.com


Certshared now are offering 100% pass ensure JavaScript-Developer-I dumps!
https://www.certshared.com/exam/JavaScript-Developer-I/ (157 Q&As)

D. 0 1 2 2

Answer: C

NEW QUESTION 102


Refer to the following code that imports a module named utils:

Which two implementations of Utils.js export foo and bar such that the code above runs without error?
Choose 2 answers

A.

B.

C.

D.

Answer: BC

NEW QUESTION 104


Refer to the code below:
Async funct on functionUnderTest(isOK) { If (isOK) return ‘OK’ ;
Throw new Error(‘not OK’);
)
Which assertion accuretely tests the above code?

A. Console.assert (await functionUnderTest(true), ‘ OK ’)


B. Console.assert (await functionUnderTest(true), ‘ not OK ’)
C. Console.assert (awaitfunctionUnderTest(true), ‘ not OK ’)
D. Console.assert (await functionUnderTest(true), ‘OK’)

Answer: D

NEW QUESTION 108


What is the result of the code block?

A. The console logs only ‘flag’.


B. The console logs ‘flag’ and another flag.
C. An error is thrown.
D. The console logs ‘flag’ and then an error isthrown.

Answer: D

Guaranteed success with Our exam guides visit - https://www.certshared.com


Certshared now are offering 100% pass ensure JavaScript-Developer-I dumps!
https://www.certshared.com/exam/JavaScript-Developer-I/ (157 Q&As)

NEW QUESTION 109


Given the JavaScript below:
1 function filterDOM (searchString) {
2 const parsedSearchString = searchString && searchString.toLowerCase() ;
03 document.quesrySelectorAll(‘ .account’ ) . forEach(account => (
04 const accountName = account.innerHTML.toLOwerCase();
05 account. Style.display = accountName.includes(parsedSearchString) ? /*Insert code*/;
06 )};
07 }
Which code should replace the placeholder comment on line 05 to hide accounts that do not match thesearch string?

A. ‘ name ’ : ‘ block ’
B. ‘ Block ’ : ‘ none ’
C. ‘ visible ’ : ‘ hidden ’
D. ‘ hidden ’ : ‘ visible ’

Answer: B

NEW QUESTION 112


......

Guaranteed success with Our exam guides visit - https://www.certshared.com


Certshared now are offering 100% pass ensure JavaScript-Developer-I dumps!
https://www.certshared.com/exam/JavaScript-Developer-I/ (157 Q&As)

Thank You for Trying Our Product

We offer two products:

1st - We have Practice Tests Software with Actual Exam Questions

2nd - Questons and Answers in PDF Format

JavaScript-Developer-I Practice Exam Features:

* JavaScript-Developer-I Questions and Answers Updated Frequently

* JavaScript-Developer-I Practice Questions Verified by Expert Senior Certified Staff

* JavaScript-Developer-I Most Realistic Questions that Guarantee you a Pass on Your FirstTry

* JavaScript-Developer-I Practice Test Questions in Multiple Choice Formats and Updatesfor 1 Year

100% Actual & Verified — Instant Download, Please Click


Order The JavaScript-Developer-I Practice Test Here

Guaranteed success with Our exam guides visit - https://www.certshared.com


Powered by TCPDF (www.tcpdf.org)

You might also like