Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
773 views

Javascript Developer I - 5

The document advertises premium JavaScript developer exam dumps from Exambible.com. It provides details on Exambible as a company specialized in providing high-quality IT exam study materials since 1998. It claims unique advantages such as 99.9% uptime, 24/7 support, and a 100% pass guarantee with refund or free retake if the first attempt is failed.

Uploaded by

faldecosea
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
773 views

Javascript Developer I - 5

The document advertises premium JavaScript developer exam dumps from Exambible.com. It provides details on Exambible as a company specialized in providing high-quality IT exam study materials since 1998. It claims unique advantages such as 99.9% uptime, 24/7 support, and a 100% pass guarantee with refund or free retake if the first attempt is failed.

Uploaded by

faldecosea
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

We recommend you to try the PREMIUM JavaScript-Developer-I Dumps From Exambible

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

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

Your Partner of IT Exam visit - https://www.exambible.com


We recommend you to try the PREMIUM JavaScript-Developer-I Dumps From Exambible
https://www.exambible.com/JavaScript-Developer-I-exam/ (157 Q&As)

About Exambible

Your Partner of IT Exam

Found in 1998

Exambible is a company specialized on providing high quality IT exam practice study materials, especially Cisco CCNA, CCDA,
CCNP, CCIE, Checkpoint CCSE, CompTIA A+, Network+ certification practice exams and so on. We guarantee that the
candidates will not only pass any IT exam at the first attempt but also get profound understanding about the certificates they have
got. There are so many alike companies in this industry, however, Exambible has its unique advantages that other companies could
not achieve.

Our Advances

* 99.9% Uptime
All examinations will be up to date.
* 24/7 Quality Support
We will provide service round the clock.
* 100% Pass Rate
Our guarantee that you will pass the exam.
* Unique Gurantee
If you do not pass the exam at the first time, we will not only arrange FULL REFUND for you, but also provide you another
exam of your claim, ABSOLUTELY FREE!

Your Partner of IT Exam visit - https://www.exambible.com


We recommend you to try the PREMIUM JavaScript-Developer-I Dumps From Exambible
https://www.exambible.com/JavaScript-Developer-I-exam/ (157 Q&As)

NEW QUESTION 1
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 Rowlog when ‘Click me! ’ is clicked?

A. Add.event.stopPropagation(); to window.onLoad event handler.


B. Add event.stopPropagation(); to printMessage function.
C. Add event.removeEventListener(); to window.onLoad event handler.
D. Addevent.removeEventListener(); toprintMessage function.

Answer: B

NEW QUESTION 2
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 3
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 4
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
executenpm 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_ENVIs 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: BCD

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

NEW QUESTION 6
developer is trying to convince management that their team will benefit from using
Node.js for a backend server that they are going to create. The server will be a web server that handles API requests from a website that the team has already
built using HTML, CSS, and JavaScript.
Which three benefits of Node.js can the developer use to persuade their manager? Choose 3 answers:

Your Partner of IT Exam visit - https://www.exambible.com


We recommend you to try the PREMIUM JavaScript-Developer-I Dumps From Exambible
https://www.exambible.com/JavaScript-Developer-I-exam/ (157 Q&As)

A. I nstalls with its own package manager toinstall and manage third-party libraries.
B. Ensures stability with one major release every few years.
C. Performs a static analysis on code before execution to look for runtime errors.
D. Executes server-side JavaScript code to avoid learning a new language.
E. User non blocking functionality for performant request handling .

Answer: ACE

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

A. ‘Update’ , ( recordId : ‘123abc’ (


B. ‘Update’ , ‘123abc’
C. { type : ‘update’, recordId : ‘123abc’ }
D. ‘Update’ , { Details : { recordId : ‘123abc’}}

Answer: AD

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

Answer: A

NEW QUESTION 9
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 10
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 10
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 global scope and line 02 throws an error.
D. The url variable has local scope and line 02 executes correctly.

Answer: B

NEW QUESTION 15
A test has a dependency on database. query. During the test, the dependency is replaced with an object called database with the method,
Calculator query, that returns an array. The developer does notneed to verify how many times the method has been called.
Which two test approaches describe the requirement? Choose 2 answers

Your Partner of IT Exam visit - https://www.exambible.com


We recommend you to try the PREMIUM JavaScript-Developer-I Dumps From Exambible
https://www.exambible.com/JavaScript-Developer-I-exam/ (157 Q&As)

A. White box
B. Stubbing
C. Black box
D. Substitution

Answer: AD

NEW QUESTION 16
Refer to the code below: Let textValue = ’1984’;
Which code assignment shows a correct way to convert this string to an integer?

A. let numberValue = Number(textValue);


B. Let numberValue = (Number)textValue;
C. Let numberValue = textValue.toInteger();
D. Let numberValue = Integer(textValue);

Answer: A

NEW QUESTION 21
Refer to code below:

What is displayed when the code executes?

A. ReferenceError: b is not defined


B. a
C. Undefined
D. Null

Answer: C

Explanation:

NEW QUESTION 25
A developer uses a parsed JSON string to work with userinformation as in the block below:
01 const userInformation ={
02 “ id ” : “user-01”,
3 “email” : “user01@universalcontainers.demo”,
4 “age” : 25
Which two options access the email attribute in the object? Choose 2 answers

A. userInformation(“email”)
B. userInformation.get(“email”)
C. userInformation.email
D. userInformation(email)

Answer: AC

NEW QUESTION 29
Refer to following code: class Vehicle { constructor(plate) { This.plate =plate;
}
}
Class Truck extends Vehicle { constructor(plate, weight) {
//Missing code This.weight = weight;
}
displayWeight() {
console.log(‘Thetruck ${this.plate} has a weight of ${this.weight} lb.’);}} Let myTruck = new Truck(‘123AB’, 5000);
myTruck.displayWeight();
Which statement should be added to line 09 for the code to display ‘The truck 123AB has a weight of 5000lb.’?

Your Partner of IT Exam visit - https://www.exambible.com


We recommend you to try the PREMIUM JavaScript-Developer-I Dumps From Exambible
https://www.exambible.com/JavaScript-Developer-I-exam/ (157 Q&As)

A. Super.plate =plate;
B. super(plate);
C. This.plate =plate;
D. Vehicle.plate = plate;

Answer: B

NEW QUESTION 34
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 39
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 42
Refer to the code below: console.log(‘’start);
Promise.resolve(‘Success’) .then(function(value){
console.log(‘Success’);
});
console.log(‘End’);
What is the output after the code executes successfully?

A. EndStart Success
B. StartSuccess End
C. StartEnd Success
D. Success Start End

Answer: C

NEW QUESTION 47
Which codestatement below correctly persists an objects in local Storage ?

A. const setLocalStorage = (storageKey, jsObject) => { window.localStorage.setItem(storageKey, JSON.stringify(jsObject));}


B. const setLocalStorage = ( jsObject) => { window.localStorage.connectObject(jsObject));}
C. const setLocalStorage = ( jsObject) => { window.localStorage.setItem(jsObject);}
D. const setLocalStorage = (storageKey, jsObject) => { window.localStorage.persist(storageKey, jsObject);}

Answer: A

NEW QUESTION 48

Your Partner of IT Exam visit - https://www.exambible.com


We recommend you to try the PREMIUM JavaScript-Developer-I Dumps From Exambible
https://www.exambible.com/JavaScript-Developer-I-exam/ (157 Q&As)

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 52
Given the code below:

What should a developer insert at line 15 to output the following message using the method ?
> SNEGeneziz is loading a cartridgegame: Super Monic 3x Force . . .

A. Console16bit.prototype.load(gamename) = function() {
B. Console16bit.prototype.load = function(gamename) {
C. Console16bit = Object.create(GameConsole.prototype).load = function (gamename) {
D. Console16bit.prototype.load(gamename) {

Answer: B

NEW QUESTION 54
A developer wrote a fizzbuzz function that when passed in a number, returns the following:
‘Fizz’ if the number is divisible by 3. ‘Buzz’ if the number is divisible by 5.
‘Fizzbuzz’ if the number is divisible by both 3 and 5. Emptystring if the number is divisible by neither 3 or 5.
Which two test cases will properly test scenarios for the fizzbuzz function? Choose 2 answers

A. let res = fizzbuzz(5); console.assert ( res === ‘ ’ );


B. let res = fizzbuzz(15);console.assert ( res ===‘ fizzbuzz ’ )
C. let res = fizzbuzz(Infinity); console.assert ( res === ‘ ’ )
D. let res = fizzbuzz(3); console.assert ( res === ‘ buzz ’ )

Answer: BCD

NEW QUESTION 56
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 59
Refer to the code below:
new Promise((resolve, reject) => { const fraction = Math.random();
if( fraction >0.5) reject("fraction > 0.5, " + fraction); resolve(fraction);
})
.then(() =>console.log("resolved"))
.catch((error) => console.error(error))
.finally(() => console.log(" when am I called?"));

When does Promise.finally on line 08 get called?

A. When rejected
B. When resolved and settled
C. WHen resolved
D. When resolved or rejected

Answer: D

NEW QUESTION 63

Your Partner of IT Exam visit - https://www.exambible.com


We recommend you to try the PREMIUM JavaScript-Developer-I Dumps From Exambible
https://www.exambible.com/JavaScript-Developer-I-exam/ (157 Q&As)

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

NEW QUESTION 67
Which three options show valid methods for creating a fat arrowfunction? Choose 3 answers

A. x => ( console.log(‘ executed ’) ; )


B. [ ] => ( console.log(‘ executed ’) ;)
C. ( ) => ( console.log(‘ executed ’) ;)
D. X,y,z => ( console.log(‘ executed ’) ;)
E. (x,y,z) => ( console.log(‘ executed ’) ;)

Answer: AE

NEW QUESTION 68
Refer to the following code that performs a basic mathematical operation on a provided input:
function calculate(num) { Return (num +10) / 3;
}
How should line 02 be written to ensure thatx evaluates to 6 in the line below? Let x = calculate (8);

A. Return Number((num +10) /3 );


B. Return (Number (num +10 ) / 3;
C. Return Integer(num +10) /3;
D. Return Number(num + 10) / 3;

Answer: B

NEW QUESTION 71
Teams at Universal Containers(UC) work on multiple JavaScript projects at the same time. UC is thinking about reusability and how each team can benefit from
the work of others. Going open-source or public is not an option at this time.
Which option is available to UC with npm?

A. Private packages can be scored, and scopes can be associated to a private registries.
B. Private registries are not supported by npm, but packages can be installed via URL.
C. Private packages are not supported, but they can use another package manager like yarn.
D. Private registries are not supported by npm, but packages can be installed via git.

Answer: A

NEW QUESTION 76
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 78
A developer is required to write a function that calculates the sum of elements in an
array but is getting undefinedevery time the code is executed. The developer needs to find what is missing in the code below.
Const sumFunction = arr => {
Return arr.reduce((result, current) => {
//
Result += current;
//
), 10);
);
Which option makes the code work as expected?

A. Replace line 02 with return arr.map(( result, current) => (


B. Replace line 04 with result = result +current;
C. Replace line 03 with if(arr.length == 0 ) ( return 0; )
D. Replace line 05 with return result;

Your Partner of IT Exam visit - https://www.exambible.com


We recommend you to try the PREMIUM JavaScript-Developer-I Dumps From Exambible
https://www.exambible.com/JavaScript-Developer-I-exam/ (157 Q&As)

Answer: D

NEW QUESTION 82
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 13 4
C. 1 2 4 3 5
D. 1 2 5 3 4

Answer: B

NEW QUESTION 87
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 91
developer wants to use a module nameduniversalContainersLib and them call functions from it.
How should a developer import every function from the module and then call the fuctions foo and bar ?

A. import * ad lib from ‘/path/universalContainersLib.js’; lib.foo();lib.bar();


B. import (foo, bar) from ‘/path/universalContainersLib.js’; foo();bar();
C. import all from ‘/path/universalContaineraLib.js’; universalContainersLib.foo(); universalContainersLib.bar();
D. import * from ‘/path/universalContaineraLib.js’; universalContainersLib.foo(); universalContainersLib.bar();

Answer: A

NEW QUESTION 92
Which two code snippets show working examples of a recursive function? Choose 2 answers

A. Let countingDown = function(startNumber) { If ( startNumber >0) { console.log(startNumber) ;return countingDown(startNUmber);} else {return startNumber;}};
B. Function factorial ( numVar ) { If (numVar < 0) return;If ( numVar === 0 ) return 1; return numVar -1;
C. Const sumToTen = numVar => { If (numVar < 0)Return;return sumToTen(numVar + 1)};
D. Const factorial =numVar => { If(numVar < 0) return;If ( numVar === 0 ) return 1;return numVar * factorial ( numVar - 1 );};

Answer: AD

NEW QUESTION 95
......

Your Partner of IT Exam visit - https://www.exambible.com


We recommend you to try the PREMIUM JavaScript-Developer-I Dumps From Exambible
https://www.exambible.com/JavaScript-Developer-I-exam/ (157 Q&As)

Relate Links

100% Pass Your JavaScript-Developer-I Exam with Exambible Prep Materials

https://www.exambible.com/JavaScript-Developer-I-exam/

Contact us

We are proud of our high-quality customer service, which serves you around the clock 24/7.

Viste - https://www.exambible.com/

Your Partner of IT Exam visit - https://www.exambible.com


Powered by TCPDF (www.tcpdf.org)

You might also like