Javascript-Developer-I V12.35
pdf
keyboard_arrow_up
School
University of Alabama *
*We aren’t endorsed by this school
Course
103
Subject
Computer Science
Date
Apr 3, 2024
Type
Pages
51
Uploaded by DoctorFalcon4173
Exam
:
Javascript-Developer-I
Title
:
Salesforce Certified JavaScript
Developer I Exam
Vendor
:
Salesforce
Version
:
V12.35
IT Certification Guaranteed, The Easy Way!
1
NO.1
Refer to the code below:
Let textvalue = '1984';
Which code segment 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
NO.2
Refer to the following code:
Which statement should be added to line 09 for the code to display. The truck 123AB has a weight of
5000 Ib. '?
A.
Super.plate = plate;
B.
Super = (plate ) ;
C.
This .plate = plate;
D.
Vehicle.plate = plate
Answer:
B,C,D
NO.3
Which JavaScript method can be used to serialize an object into a string and deserialize a JSON
string into an object, respectively?
A.
JSON,serialize and JSON,desrialize
B.
JSON.encode and JSON decode
C.
JSON.parse and JSON deserialize
D.
JSON.Stringify and JSON.parse
Answer:
A
NO.4
A developer is leading the creating of a new browser application that will server a single page
application. The team wants to use a new web framework Minialist.js. The lead developer wants to
advocate for a more seasoned wen framework that already has a community around it.
Which two frameworks should the load developer advocate for?
A.
Vue
B.
Angular
C.
Koa
D.
Express
Answer:
B,D
IT Certification Guaranteed, The Easy Way!
2
NO.5
Refer to the code below:
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
NO.6
A developer is asked to fix some bugs reported by users. To do that, the developer adds a
breakpoint for debugging.
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 value of the carSpeed and fourWheel variables
B.
A variable's displaying the number of instances created for the Car 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:
C,D
NO.7
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 between line 04 and the end of the file.
B.
Z is equal to 3,14.
C.
'use strict , is hoisted, so it has an effect on all lines.
IT Certification Guaranteed, The Easy Way!
3
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
- Access to all documents
- Unlimited textbook solutions
- 24/7 expert homework help
D.
Line 05 throws an error.
E.
'use strict' has an effect only on line 05.
Answer:
B,C,D
NO.8
Refer to the following code:
What is the output of line 11?
A.
[1, 2]
B.
[''bar'' , ''foo'']
C.
['foo'', ''bar'']
D.
[''foo:1'', ''bar:2'']
Answer:
C
NO.9
Refer to the following code:
Which two statements could be inserted at line 17 to enable the function call on line 18?
Choose 2 answers
A.
1eo.roar = () => 9 (console.log('They\'re pretty good1'); 1;
B.
Object.assign, assign( 1eo, trigger);
IT Certification Guaranteed, The Easy Way!
4
C.
Object,assign(1eo, tony) ;
D.
1eo.prototype.roar = ( ) => ( console.log (They\'re pretty good1'); );
Answer:
A,C
NO.10
Refer to the code below:
Line 05 causes an error.
What are the values of greeting and salutation once code completes?
A.
Greeting is Hello and salutation is Hello, Hello.
B.
Greeting is Goodbye and salutation is Hello, Hello.
C.
Greeting is Goodbye and salutation is I say Hello.
D.
Greeting is Hello and salutation is I say hello.
Answer:
A
NO.11
Refer to the 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'?
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
NO.12
Cloud Kicks has a class to represent item for sale in an online store, as shown below:
A new business requirement comes in that request a clothingitem class, that should have all of the
properties and methods of the item class, but will also have properties that are specific top clothes.
Which line of code properly declares the clothingitem class such that it inherits from item?
A.
Class clothingitem implements item (
B.
Class Clothingitem (
IT Certification Guaranteed, The Easy Way!
5
C.
Class clothing item super item (
D.
Class clothingitem extends item (
Answer:
D
NO.13
A test has a dependency on database .query. During the test the dependency is replace with
an called database with the method, query, that returns an array. The developer needs to verify how
many times the method was called and the arguments used each time.
Which two test approaches describe the requirement?
A.
Integration
B.
Black box
C.
White box
D.
Mocking
Answer:
A,C
NO.14
Which three statements are true about promises?
The executor of a new promise runs automatically.
A.
A promise has a . then 90 method.
B.
A fulfilled or rejected promise will not change states.
C.
A settled promises can become resolved.
D.
A pending promise can become fulfilled, settled or rejected.
Answer:
A,B,C
NO.15
A developer wants to use a module named universalContainerLib and then call functions from
it.
How should a developer import every function from the module and then call the functions foo and
bar?
A.
import - as lib from '/path/universalContainerLib.js''
lib.foo( ) ;
lib. bar ( ) ;
B.
import (foo,bar) from '/path/universalContainerLib.js''
foo ( ) ;
bar ( ) ;
C.
import all from '/path/universalContainerLib.js''
universalContainersLib.foo( ) ;
universalContainersLib bar ( ) :
D.
import + from '/path/universalContainerLib.js''
universalContainersLib.foo( ) ;
universalContainersLib bar ( ) :
Answer:
A
NO.16
Given the following code:
IT Certification Guaranteed, The Easy Way!
6
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
- Access to all documents
- Unlimited textbook solutions
- 24/7 expert homework help
Which replacement for the conditional statement on line 02 allows a developer to correctly
determine that a button on the page is clicked?
A.
Event, clicked
B.
Event,target.nodename == 'BUTTON"
C.
o.nodeTarget == this
D.
button.addEventListener ( 'click')
Answer:
B
NO.17
A developer wants to literate through an array of objects and count the objects whose
property value, name, start with the letter N. const arrobj - [{''name ''t ''Zach''}, { ''name t Kate'') , (
''name Alice'') < ( ''name'' t ''Bob'') , (''name'' t ''Nathan) , (''name'' t ''Nathandle1'')] Refer to the code
snippet below:
Which missing lines 02 and 03 return the correct count?
A.
Conset sun + curr. StartsWith ('N') 7 1 : 1;
Return acc + sum ;
B.
Comst sum = curr. Name startsWith ('N') 7 1 : 0
Return acc + sum;
C.
Comst sum = curr. name startsWith ('N') 7 1 : 0;
Return curr + sum;
D.
Const sum = curr. name startsWith ('N') 7 1 : 0;
Return curr + sum;
Answer:
B
NO.18
Teams at Universal Containers (CU) work on multiple JavaScript projects at the same time. UC
us 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 scoped, and scopes can be associated to a private registries.
B.
Private registries are not supported by spm, but packages can be installed vis URL.
C.
Private packages are not supported, but they can use another package manager like yarm.
D.
Private register are not supported by npm, but packages can be installed via git.
Answer:
C
NO.19
Refer to the expression below:
Let x = ('1' + 2) == (6 + 2) ;
How should this expression be modified to ensure that a evaluated to false?
A.
Let x = (1' + '2') == (6 + 2) ;
B.
Let x = (1' + '2') === (6 + 2) ;
C.
Let x = (1' + '2') == ('6' / 2) ;
D.
Let x = (1' + '2') === (6 / 2) ;
IT Certification Guaranteed, The Easy Way!
7
Answer:
B
NO.20
Refer to the code below:
For (let number =2: number <= S; number += 1) ( // insert code statement here The developer needs
to insert a code statement in the location shown. The code statement has these requirements:
1. Does not require an import
2. Logs an error when the Boolean statement evaluates to false
3. Works In both the browser and Node.js
Which statement meet these requirements?
A.
Assert (number $
2 == 0);
B.
Console. error (number $
2 == 0) ;
C.
Console. Debug (number $
2 == 0) ;
D.
Console. Assert ( number $
2 == 0 ) ;
Answer:
D
NO.21
Refer to the code below:
What is the value of result when Promise. race executes?
A.
Car 3 completed the race
B.
Car 1 crashed the race
C.
Car 2 completed the race
D.
Race is cancelled.
Answer:
B
NO.22
Given the following code:
What is the output of line 02?
A.
''null''
B.
''x''
C.
''object''
D.
''Undefined''
Answer:
C
NO.23
Refer to the following code:
IT Certification Guaranteed, The Easy Way!
8
What will the console when the button is clicked?
A.
Outer message
B.
Outer message
C.
Inner message
D.
Inner message
Answer:
B
NO.24
Given the JavaSript below:
Which code should replace the placeholder comment on line 05 to hide accounts that do not match
the search string?
A.
none' ; 'block '
B.
'Block' ; 'none'
C.
'Visible' ; hidden'
D.
'hidden'; 'visible'
Answer:
B
NO.25
Refer to the HTML below:
Which expression outputs the screen width of the element with the ID card-01?
A.
Documents.getElementById( 'card-01') .getBoundingClientRect () .width
B.
Documents.getElementById( 'card-01') . style,width
C.
Documents.getElementById( 'card-01') . width
D.
Documents.getElementById( 'card-01') . InnerHTML. Length.6
Answer:
A
NO.26
Refer to the code below:
IT Certification Guaranteed, The Easy Way!
9
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
- Access to all documents
- Unlimited textbook solutions
- 24/7 expert homework help
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', {
Detail ; {
recordId, '123abc
)
)
Answer:
A,D
NO.27
A developer is setting up a new Node.js server with a client library that is built using events
and callbacks.
The library:
* Will establish a web socket connection and handle receipt of messages to the server
* Will be imported with require, and made available with a variable called ws.
The developer also wants to add error logging if a connection fails.
Given this information, which code segment show the correct way to set up a client two events that
listen at execution time?
A)
B)
C)
IT Certification Guaranteed, The Easy Way!
10
D)
A.
Option A
B.
Option B
C.
Option C
D.
Option D
Answer:
D
NO.28
What are two unique feature of function defined with a fat arror as compared to normal
functional definition?
Choose 2 answers
A.
The function generation its own this making it useful for separating the function's scope its
enclosing scope
B.
The function receives an argument that is always in scope, called parent this, which is the
enclosing lexical scope
C.
If the function has a single expression in the function body, the expression will be evaluated and
implicitly returned.
D.
The function uses the this from the enclosing scope.
Answer:
C
NO.29
Refer to the code below:
IT Certification Guaranteed, The Easy Way!
11
In which sequence will the number be logged?
A.
0 1 2 3 4
B.
0 2 4 3 1
C.
0 2 4 1 3
D.
1 3 0 2 4
Answer:
B
NO.30
A developer at Universal Container creates a new landing page based on HTML, CSS, and
JavaScript.
To ensure that visitors have a good experience, a script named personalizeewebsiteCotent 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 be used to call personalizeWebsiteContent based on the above business
requirement?
A.
Document, addEventListener ('oDCMContentLoaded' , personalizewensiteContent);
B.
Window, addEventListener('load', personalizewebsiteContent);
C.
Window, addEventListener('onload', personalizewebsiteContent);
D.
Document,addEventListener ('DCMContentLoaded' , personalizeWebsiteContent);
Answer:
B
NO.31
The developer wants to test the array shown:
Const arr = Array (5) . fill (0);
Which two test are the most accurate for this array? Choose 2 answers
A.
Console,assert(arr.length === 5) ;
B.
Arr. forEach (elem => console .assert (elem === 0) );
C.
Console,assert(arr(0) === 0 $$
arr (arr .longth ) === 0) ;
D.
Console. Assert (arr. Length > 0) ;
Answer:
B
NO.32
A developer wants to create an object from a function in the browser using the code below.
What happens due to lack of the new keyword on line 02?
A.
The a variable is assigned the correct object.
IT Certification Guaranteed, The Easy Way!
12
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
- Access to all documents
- Unlimited textbook solutions
- 24/7 expert homework help
B.
Window. n is assigned the correct object.
C.
Window. === name is assigned to ''hello'' and the variable a n remain undefined.
D.
The n variable is assigned the correct object but this- remains undefined.
Answer:
C
NO.33
Refer to the code below:
Which two function can replace line 01 and return 58 to sum? Choose 2 answers
A.
const addBy = function (num1) {
Return function (num2) {
}
}
B.
Const addby = function (num1) (
Return function (num2) (
}
}
C.
const addBy = (num1) num1 + num2
D.
const addBy = num1 (num2) => num1 + num2 ;
Answer:
A,D
NO.34
Refer to the code below:
Const pi w 3.1415926;
What is the data type of pi?
A.
Double
B.
Number
C.
Decimal
D.
Float
Answer:
B
NO.35
A developer is creating a simple webpage with a button. When a user clicks this button for
the first time, a message is displayed.
The developer wrote the JavaScript code below, but something is missing. The message gets
displayed time a user clicks the button instead of just the first time.
Which two code lines make this code work as required? Choose 2 answers
A.
On line 02, use event.first to test if it is the first execution.
B.
On line 04, use event .stopPropagetion ( );
IT Certification Guaranteed, The Easy Way!
13
C.
On line 04, use button. removeEventlistener ('click', listen );
D.
On line 06, ad an option called once to button. addEventlistener ( ).
Answer:
C,D
NO.36
A class was written to represent items for purchase in an online store, and a second class
representing items that are on sale at a discounted price. The constructor sets the name to the first
value passed in. The pseudocode is below:
There is a new requirement for a developer to implement a description method that will retrun a
brief description for item and saleitem.
What is the out when executing the code above?
A.
This is a Scarf
Unicaught TypeError: saleitem, description is not a function
This is a Scarf
This is a discounted Shirt
B.
This is a Scarf
This is a Shirt
This is a Scarf
This is a discounted Shirt
C.
This is a Scarf
This is a Shirt
This is a discounted Scard
This is a discounted Shirt
D.
This is a Scaf
Uncaught TypeError: saleItem, description is not a function
This is a Shirt
This is a discounted Shirt
Answer:
B
IT Certification Guaranteed, The Easy Way!
14
NO.37
Refer to the code below:
What is the value of result after the code executes?
A.
10
B.
NaN
C.
5
D.
undefined
Answer:
C
NO.38
Which statement accurately describes the behavior of the async /swait keywords?
A.
The associated class contains some asynchronous functions.
B.
The associated function can only be called via asynchronous methods.
C.
The associated function sometimes returns a promise.
D.
The associated function will always return a promise.
Answer:
D
NO.39
Given the following code:
What is the logged by the first four log statements?
A.
0 0 1 2
B.
0 1 2 3
C.
0 1 1 2
D.
0 1 2 2
Answer:
C
NO.40
Which code statement correctly retrieves and return an object from localStorage?
A)
IT Certification Guaranteed, The Easy Way!
15
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
- Access to all documents
- Unlimited textbook solutions
- 24/7 expert homework help
B)
C)
D)
A.
Option A
B.
Option B
C.
Option C
D.
Option D
Answer:
D
NO.41
Refer to the code below:
What is the value result after line 10 executes?
A.
Error: myfather.job is not a function
B.
Undefined Developer
C.
John undefined
D.
John Developer
Answer:
A
NO.42
A developer implements a function that adds a few values.
Which three options can the developer invoke for this function to get a return vale of 10? Choose 3
IT Certification Guaranteed, The Easy Way!
16
answers
A.
Sum () (10)
B.
Sum (5, 5) ()
C.
Sum () (5, 5)
D.
Sum (5) (5)
E.
Sum (10) ()
Answer:
A,C,D
NO.43
Considering type coercion, What does the following expression evaluate to?
True + ) + '100 ' + null
A.
104
B.
4100
C.
'3100null'
D.
'4100null'
Answer:
D
NO.44
A developer wants to leverage a module to print a price in pretty format, and has imported a
method as shown below:
Import printPrice from '/path/PrincePrettyPrint. Js';
Based on the code, what must be true about the printPrice function of the PricePrettyPrint modules
for this import to work?
A.
printPrice must be named export
B.
printPrice must be an all export
C.
printPrice must be an default export
D.
printPrice must be a multi export
Answer:
A
NO.45
Which two code snippets show working examples of a recursive function?
Choose 2 answers
A)
B)
C)
IT Certification Guaranteed, The Easy Way!
17
D)
A.
Option A
B.
Option B
C.
Option C
D.
Option D
Answer:
C,D
NO.46
Given the code below:
What happens when the code executes?
A.
The ur1 variables has local scope and line 02 throws an error.
B.
The ur1 variable has global scope and line 02 executes correctly.
C.
The ur1 variable has global scope and line 02 throws an error.
D.
The ur1 variable has local scope and line 02 executes correctly.
Answer:
B
NO.47
Why would a developer specify a package as the package.json as a deDepdelivery instead of a
depdelivery?
A.
It is required by the application in production.
B.
It is only needed for local development and testing.
C.
Other required packages depended on it for development.
D.
It should be bundled when the package is published.
Answer:
B
NO.48
Refer to the following code:
IT Certification Guaranteed, The Easy Way!
18
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
- Access to all documents
- Unlimited textbook solutions
- 24/7 expert homework help
What is returned by the function call on line 13?
A.
Undefined
B.
Line 13 throws an error.
C.
Undefined value.
D.
Null value
Answer:
B
NO.49
Which three actions can be done using the JavaSript browser console?
Choose 3 answer
A.
View and change the DOM of the page.
B.
Display a report showing the performance of a page.
C.
Run code a that is not related to the page.
D.
View, change, and debug the JavaScript code of the page.
E.
View and change security cookies
Answer:
A,C,D
NO.50
A developer has an ErrorMandler module that contains multiple functions.
What kind of export should be leveraged so that multiple function can be used?
A.
Named
B.
All
C.
Multi
D.
default
Answer:
A
NO.51
Given the HTML below:
Which statement adds the priority-account CSS class to the Unversal Containers row?
A.
Document. queryselector ('# row-uc') ,classes. Push (' priority-account');
B.
Document. getElementById ( 'row-uc') addClass ( ' priority-account');
IT Certification Guaranteed, The Easy Way!
19
C.
Document. querySelector ( 'row-uc') . classList. Add ( 'pariority-account') ;
D.
Document. querySelectorAll ( '# row-uc ') .classList. add ('priority-account');
Answer:
C
NO.52
Which three browser specific APIs are available for developer to persist data between page
loads?
Choose 3 answers
A.
IIFEs
B.
indexedDB
C.
global variables
D.
cookies
E.
localStorage
Answer:
A,B,E
NO.53
Given the code below:
What is the expected output?
A.
Both lines 08 and 09 are executed, and the variables are outputted.
B.
Line 08 outputs the variable, but line 09 throws an error.
C.
Line 08 throws an error, therefore line 09 is never executed.
D.
Both lines 06 and 09 are executed, but the values outputted are undefined.
Answer:
B
NO.54
A developer creates a generic function to log custom messages In the console. To do this, the
function below is implemented.
Which three console logging methods allow the use of string substitution in line 02?
Choose 3 answers
A.
Assert
B.
Log
C.
Message
D.
Info
E.
error
Answer:
A,C,E
IT Certification Guaranteed, The Easy Way!
20
NO.55
Given the code below:
Which method can be provide a visual representation of the list if users and to allow sorting by the
name or email attributes.
A.
Console,table (userslist);
B.
Console.groupCollapsed (userslist);
C.
Console.info (userlist);
D.
Console.group (userList);
Answer:
D
NO.56
Given two expressions var1 and var2, what are two valid ways to return the logical AND of
the two expression and ensure it is data type Boolean? Choose 2 answers
A.
Boolean (var1 && var2)
B.
Var1 && var2
C.
Var1. Toboolean ( ) && var2, to Boolean ( )
D.
Boolean (var1) && Boolean (var2)
Answer:
A,C
NO.57
Which two console logs out NaN?
Choose 2 answers
A.
Console.log(10 / Number ('5) );
B.
Console.log(parseint ('two') ) ;
C.
Console.log(10 / 'five' ') ;
D.
Console.log (10 / 0);
Answer:
B,C
NO.58
Refer to the code below:
Which assertion accurately tests the above code?
A.
Console, assert ( await functionalUnderTest (true) , 'ok
B.
Console, assert ( await functionalUnderTest (true) , 'not ok) )
C.
Console, assert ( await functionalUnderTest (true) , 'not ok' )
D.
Console, assert (functionalUnderTest (true) , 'ok')
IT Certification Guaranteed, The Easy Way!
21
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
- Access to all documents
- Unlimited textbook solutions
- 24/7 expert homework help
Answer:
D
NO.59
Which statement can a developer apply to increment the browser's navigation history
without a page refesh?
A.
Window.history,state,push.(newStateObject);
B.
Window.history,state,push.(newStateObject, ' ' null;
C.
Window.history,pushState.(newStateObject, ' ', null)) ;
D.
Window.history,pushState.(newStateObject);
Answer:
B
NO.60
Refer to the following object:
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:
C
NO.61
A developer has two ways to write a function:
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 growl method is created for Option A. 1000 growl methods are created for Option B.
B.
1000 growl methods are created for Option A. 1 growl method is created for Option B.
C.
1000 growl methods are created regardless of which option is used.
D.
1 growl method is created regardless of which option is used.
Answer:
B
IT Certification Guaranteed, The Easy Way!
22
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
- Access to all documents
- Unlimited textbook solutions
- 24/7 expert homework help
NO.62
Refer to the code below.
After changing the string index values, the of atr 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:
A
NO.63
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 02 assertion passes.
B.
The line 02 assertion fails.
C.
The line 05 assertion passes.
D.
The line 05 assertion fails.
Answer:
A,D
NO.64
A developer is working on an ecommerce website where the delivery date is dynamically
calculated based on the current dat. The code line below is responsible for this calculation.
Const deliveryDate = new Date ( );
Due to changes in the business requirements, the delivery date must now be today's date + 9 days.
Which code meets this new requirements?
A.
deliveryDate. setDate (( new Date ()) .getDate () + 9);
B.
deliveryDate. setDate ( Date . current () + 9 0;
C.
deliveryDate. Date = new Date (+9) ;
D.
deliveryDate . date = date . current () + 9
Answer:
A
NO.65
Which statement parses successfully?
A.
JSON.parse ('foo ');
B.
JSON.parse (''foo '');
C.
JSON.parse ('' 'foo' '');
IT Certification Guaranteed, The Easy Way!
23
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
- Access to all documents
- Unlimited textbook solutions
- 24/7 expert homework help
D.
JSON.parse ('' 'foo'' ');
Answer:
B
NO.66
A developer removes the HTML class attributes from the check button, so now it is simply:
<button>checkout<button>.
There is a test verify the existence of the checkout button, however it look for a button with class''
blue''. The test fails because no such button is f.
Which type of test category describes this test?
A.
True positive
B.
True negative
C.
False negative
D.
False positive
Answer:
A
NO.67
A developer has code that calculates a restaurant bill, but generates incorrect answers while
testing the code.
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:
B
NO.68
Which code statement below correctly persists an object in localStorage?
A.
const setLocalstorage = (storageKey , jsobject) => (
windows. LocalStorage,setitem(storagekey. jSON,string
)
B.
const setLocalstorage = (jsobject) =>
Windows.localstorage.connectobject(jsObject);
C.
Const setLocalstorage = (jsobject ) => (
Window .localstorage .setitem (jsobject) ;
D.
Const setlocalstorage = (storagekey, jsObject) => (
Window. Localstorage.persist (storagekey, jsObject);
)
Answer:
B
IT Certification Guaranteed, The Easy Way!
24
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
- Access to all documents
- Unlimited textbook solutions
- 24/7 expert homework help
NO.69
Refer to the following code block:
What is the value of output after the code executes?
A.
16
B.
36
C.
11
D.
25
Answer:
A
NO.70
A developer creates a simple webpage with an input filed. When a user enters text In the
input field and clicks the button, the actual value of the field must be displayed in the console.
Here is the HTML file content:
The developer wrote the JavaScript code below:
When the user clicks the button, the output is always ''hello''.
What needs to be done to make this code work as expected?
A.
Replace line 04 with console.log (input, value);
B.
Replace line 04 with const input = document. getElementByName ('input') ;
C.
Replace line 04 with button.addEventListener (''onclick'', function ( ) (
D.
Replace line 04 with button, addCallback (''click'', function ( ) (
Answer:
A
NO.71
In which situation should a developer include a try... catch block around their function call?
A.
The function has an error that should not be silenced.
B.
The function results in an out of memory issue.
C.
The function might raise a runtime error that needs to be handled.
D.
The function contains scheduled code.
Answer:
C
IT Certification Guaranteed, The Easy Way!
25
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
- Access to all documents
- Unlimited textbook solutions
- 24/7 expert homework help
NO.72
Refer to the code below:
What is displayed 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:
A
NO.73
Refer to the code below:
Which code executes syhello once, two minutes from now?
A.
SetTimeout (sayhello, 120000) ;
B.
SetInterval (sayhello, 120000) ;
C.
SetTimeout (sayhello( ), 120000) ;
D.
delay (sayhello, 120000) ;
Answer:
C
NO.74
Refer to the code below:
What is the value of result when the code executes?
A.
10 - 10
B.
5 - 5
C.
5 - 10
D.
10 - 5
IT Certification Guaranteed, The Easy Way!
26
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
- Access to all documents
- Unlimited textbook solutions
- 24/7 expert homework help
Answer:
A
NO.75
Considering type coercion, What does the following expression evaluate to?
True + '13 ' + NaN
A.
113NaN
B.
14
C.
'true13'
D.
'true13NaN'
Answer:
A
NO.76
Refer to the code below:
Let inArray - [ [1, 2] , [3, 4, 5] ];
Which two statements result in the array [1, 2, 3, 4, 5 ]?
A.
[ ] . concat. Apply ( [ ], inArray) ;
B.
[ ] . concat. ( ... inArray) ;
C.
[ ] . concat. Apply (inArray, [ ] );
D.
[ ]. Concat ( [...InArray] );
Answer:
A,D
NO.77
The developer has a function that prints ''Hello'' to an input name. To test this, the developer
created a function that returns world''.
What can the developer do to change the code to print ''Hello world''?
A.
Change line 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:
A
NO.78
Universal containers (UC) just launched a new landing page, but users complain that the
website is slow, A developer found some functions that cause this problem, To verify this, the
developer decides to execute everything and log the time each of these suspicious function
consumes.
IT Certification Guaranteed, The Easy Way!
27
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
- Access to all documents
- Unlimited textbook solutions
- 24/7 expert homework help
Which function can then developer use to obtain the time spent by every one of the three functions?
A.
Console.timeLog ( )
B.
Console.getTime ( )
C.
Console,trace ( )
D.
Console, timestamp
Answer:
B
NO.79
Refer to the code below:
Let searchString = ' 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 (/^\a\a'/' ' ') ;
Answer:
B,D
NO.80
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 .start();
B.
Server. on ('connet' , (port) => (
Console.log (Listening on' port);
}};
C.
server( );
D.
server ( (port) => (
Console.log ('Listening on' , port) ;
}};
Answer:
D
NO.81
A developer is required to write a function that calculates the sum of elements in an array but
IT Certification Guaranteed, The Easy Way!
28
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
- Access to all documents
- Unlimited textbook solutions
- 24/7 expert homework help
is getting undefined every time the code is executed. The developer needs to find what is missing in
the code below.
Which option makes the code work as expected?
A.
Replace line 02 with return arr. map ( (result, current => (
B.
Replace line 04 with result + current ;
C.
Replace line 03 with if 9 (arr. Length == 0) ( return 0; )
D.
Replace line 05 with return results;
Answer:
D
NO.82
A developer is debugging a web server that uses Node.js. The server hits a runtime error
every third request to an important endpoint on the web server.
The developer added a break point to the start script, that is at index, js at the root of the server's
source code. The developer wants to make use of Chrome DevTools to debug.
Which command can be run to access DevTools and make sure the breakpoint is hit?
A.
Node -I index , js
B.
Node --inspect -brk index , js
C.
Node inspect index , js
D.
Node -- inspect index ,js
Answer:
D
NO.83
A developer has the following array of student test grades:
Let arr - [7, 8, 5, 9]
How should want to double each score and then see an array of the students who scored more than
15 points.
How should the developer implement the request?
A.
Let arr1 = arr .filter ((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 )) ;
Answer:
C
NO.84
A developer needs to test this functions:
Which two assert statements are valid tests for this function?
IT Certification Guaranteed, The Easy Way!
29
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
- Access to all documents
- Unlimited textbook solutions
- 24/7 expert homework help
A.
Console.assert(sum3((1, '2' ]) 12 );
B.
Console.assert(sum3([0]) 0) ;
C.
Console.assert(sum3 ([-3, 2]) -1) ;
D.
Console.assert(sum3 (['hello' 2, 3, 4]) NaN);
Answer:
A,C
NO.85
Given the code below:
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
NO.86
Refer to the code below:
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
Answer:
D
NO.87
A developer has a server running with Node.js. the command to start the web server is node
server.js. the server started having latency issues. Instead of a one second turnaround for web
IT Certification Guaranteed, The Easy Way!
30
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
- Access to all documents
- Unlimited textbook solutions
- 24/7 expert homework help
requests, the developer now sees a five second turnaround.
Which command can the web developer run to see what the module is doing during the latency
period?
A.
DEBUO=http, https node server,js
B.
NODE_DEBUO=http, https node server,js
C.
DEBUO=true node server,js
D.
NODE_DEBUO=true node server,js
Answer:
A
NO.88
Refer to the code below:
What is 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 is thrown.
Answer:
D
NO.89
A developer implements and calls the following code when an application state change
occurs:
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 properly that details previous application state.
B.
The page is navigated away from and 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 properly that details the application's last state.
Answer:
B
NO.90
Given the following code:
Let x = ('15' +10) +2;
What is the value of x?
A.
3020
B.
1520
C.
50
D.
35
IT Certification Guaranteed, The Easy Way!
31
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
- Access to all documents
- Unlimited textbook solutions
- 24/7 expert homework help
Answer:
B
NO.91
Given a value, which three options can a developer use to detect of the value is NaN?
Choose 3 answers
A.
Value == NaN
B.
Object , is ( value, NaN)
C.
Value == Number, NaN
D.
Value I== value
E.
Number , isNaN(value)
Answer:
A,B,E
NO.92
A developer creates a class that represents a blog post based on the requirements that a Post
should have a body, author, and view count. The code is shown below:
Which statement should be inserted in the placeholder on line 02 to allow for a variable to be sent to
a new instance of a port with the three attributes correctly populated?
A.
Super (body, author, viewCount) (
B.
Function Post (body, author, viewCount) (
C.
Constructor (body, author, viewCount) (
D.
Constructor ( ) (
Answer:
C
NO.93
A developer is wondering whether to use, promise, then or provise, catch especially when a
promise throws an error.
Which two promises are rejected? Choose 2 answers
A.
Promise, rejected (Cool error here'), then (error => console (error ));
B.
New promise (() => (throw 'Cool error here ')) , then ((null, error => console, (error)));
C.
New Promise((resolve, reject) => ( throw 'Cool error here')) .catch (error => console (error ));
D.
Promise , reject ('Cool error here ') , catch (error => console ,error (error));
Answer:
B,C
NO.94
A developer creates a new web server that uses Node.js. It imports a server 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 boot time with an
event?
A)
IT Certification Guaranteed, The Easy Way!
32
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
- Access to all documents
- Unlimited textbook solutions
- 24/7 expert homework help
B)
C)
D)
A.
Option A
B.
Option B
C.
Option C
D.
Option D
Answer:
C
NO.95
A team that works on a big project uses npm to deal with the project's dependencies.
A developer added a dependency to manipulated dates and pushed the updates to the remote
repository. The rest of the team complains that the dependency does not get download when they
execute npm install.
Which two reason could be possible explanation for this?
A.
The developer missed the option - add when adding the dependency.
B.
The developer added the dependency as a dev dependency, and NOOK_ENV is set to production.
C.
The developer missed the option -ssve when adding the dependency.
D.
The developer added the dependency as a dev dependency, and NODK_ENV is set to production.
Answer:
B,C,D
NO.96
A developer creates an object where its properties should be immutable and prevent
properties from being added or modified.
Which method should be used to execute this business requirement?
A.
Object const ( )
B.
Object. real ( )
C.
Object. filebase ( )
D.
Object. Lock ( )
Answer:
C
NO.97
The developer wants to test the code:
IT Certification Guaranteed, The Easy Way!
33
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
- Access to all documents
- Unlimited textbook solutions
- 24/7 expert homework help
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:
A,D
NO.98
Given the code below:
Const copy = JSON.stringify((new String ('false') , new Bolean(false) undefined)); What is the value of
copy?
A.
--[ false, ()]-
B.
-- [ \'false\'', false, undefined]'' ''
C.
-- [\''false\'', false, null]" "
D.
-- [\''false\", ()""
Answer:
C
NO.99
Refer to the code snippet:
A developer writes this code to return a message to a user attempting to register a new username. If
the username is available, a variable named msg is declared and assigned a value on line 03.
What is the return of msg when getivelibilityMessage ('' bewUserName') is executed and
getAvailability (''newUserName'') returns false?
A.
''Username available''
B.
''newUsername''
C.
''msg is not defined''
D.
undefined
Answer:
D
NO.100
A developer publishes a new version of a package with new feature that do not break
backward compatibility. The previous version number was 1.1.3.
Following semantic versioning format, what should the new package version number be?
A.
2.0.0
B.
1.2.3
C.
1.1.4
D.
1.2.0
Answer:
D
NO.101
Which statement accurately describes an aspect of promises?
IT Certification Guaranteed, The Easy Way!
34
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
- Access to all documents
- Unlimited textbook solutions
- 24/7 expert homework help
A.
Agruments for the callback function passed to .then ( ) are optional.
B.
In a , them ( ) function, returning results is not necessary since callback will catch the result of a
previous promise.
C.
.Them ( ) cannot be added after a catch.
D.
.then ( ) manipulates and returns the original promise.
Answer:
A
NO.102
Which function should a developer use to repeatedly execute code at a fixed time interval?
A.
setInterval
B.
setTimeout
C.
setPeriod
D.
setInterim
Answer:
A
NO.103
In the browser, the window object is often used to assign variables that require the
broadcast scope in an application Node is application do not have access to the window object by
default.
Which two methods are used to address this? Choose 2 answer
A.
Use the document instead of the window object.
B.
Assign variables to the global object.
C.
Create a new window object in the root file.
D.
Assign variables to module, exports and require them as needed.
Answer:
A,C
NO.104
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 Dan Doe
B.
Hello John Doe
C.
TypeError: dan.name is not a function
D.
TypeError: Assignment to constant variable
Answer:
C
NO.105
A developer uses a parsed JSON string to work with user information as in the block below:
IT Certification Guaranteed, The Easy Way!
35
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
- Access to all documents
- Unlimited textbook solutions
- 24/7 expert homework help
Which two option access the email attributes in the object? Choose 2 answers
A.
userInformation ( ''email'' )
B.
userInformation. Get (''email'')
C.
userInformation. email
D.
userInformation(email)
Answer:
A,C
NO.106
Refer to the following array:
Let arr = [1, 2, 3, 4, 5];
Which three options result in x evaluating as (3, 4, 5)?
Choose 3 answers
A.
Let x = arr.filter( (a) => ( a < 2)) ;
B.
Let x = arr.aplice (2, 3);
C.
Let x = arr.alice (2) ;
D.
Let x = arr.filter( (a) => )return a > 2 )) ;
E.
Let x = arr. Slince (2, 3);
Answer:
B,C,D
NO.107
Given the code below.
What is logged to the console?
A.
123
B.
132
C.
213
D.
231
Answer:
D
NO.108
A developer wants to set up a secure web server with Node.js. The developer create a
directory locally called app-server, and the first file is app-server/index, js.
IT Certification Guaranteed, The Easy Way!
36
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
- Access to all documents
- Unlimited textbook solutions
- 24/7 expert homework help
Without using any third-party libraries, what should the developer add to index, js to create the
secure web server?
A.
Const http = require ('https') ;
B.
Const server = require ( 'secure-server') ;
C.
Const tls = require ('tls') ;
D.
Const http = require ('http');
Answer:
A
NO.109
Refer to the code below:
Which statement allows a developer to cancel the scheduled timed function?
A.
removeTimeout (timeFunction) ;
B.
removeTimeout (timerId) ;
C.
ClearTimeout (timerId) ;
D.
ClearTimeout (timeFunction);
Answer:
A
NO.110
A 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?
Which three benefits of Node.js can the developer use to persuade their manager?
A.
Installs with its own package manager to install and manage third-party libraries.
B.
Ensure stability with one major release every few years.
C.
Performs a static analysis can code before execution to look for runtime errors.
D.
Executes server-side JavaScript code to avoid learning a new language.
E.
Uses non-blocking functionality for performant request handling
Answer:
C
NO.111
Universal Container (UC) notices that its application allows users to search for account
makes a network request each time a key is pressed. This results in too many request for the server
to handle.
O address this problem, UC decides to implement a deboune function on the search string change
handler. Choose 3 answers
A.
Store the timeId of the setTimeout last enqueued by the search string change handler.
B.
If there is an existing settimeout and the search string changes, allow the existing setTimeout to
finish, and do not enqueue a settimeout.
C.
When the search string changes, enqueue the request within a setTimeout.
D.
If the there is an existing setTimeout and the search string changes, cancel the existing setTimeout
IT Certification Guaranteed, The Easy Way!
37
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
- Access to all documents
- Unlimited textbook solutions
- 24/7 expert homework help
using the persisted timeout replace it with a new setTimeout.
E.
Ensure that the network request has the property debounce set to true,
Answer:
C,D,E
NO.112
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
NO.113
Refer to the following code that imports a module named Utills,
Which two implementations of Utill, je export foo and bar such that the code above runs without
IT Certification Guaranteed, The Easy Way!
38
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
- Access to all documents
- Unlimited textbook solutions
- 24/7 expert homework help
error?
Choose 2 answers
A.
//FooUtill.js and barUtils, js exist
Import (foo) from ,/Path/footUtils.js,:
Export (foo, bar)
B.
Const foo = () => ( return 'foo ' ; )
Const bar => ( return 'bar' ; )
Export (foo, bar)
C.
Export default class (
Foo ( ) ( return 'foo ,; )
Bar ( ) ( return ;bar ; )
D.
Const foo = ( ) => ( return 'foo; ; )
Const bar => => { return 'bar ';}
Export default foo, bar;
Answer:
C
NO.114
Which statement accurately describes the behavior of the async /swait keywords?
A.
The associated class contains some asynchronous functions.
B.
The associated function will always return a promise.
C.
The associated function can only be called via asynchronous methods.
D.
The associated function sometimes returns a promise.
Answer:
B
NO.115
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
NO.116
Which option is true about the strict mode in imported modules?
A.
Add the statement use non-strict; before any other statement in the module to enable not strict
mode.
B.
You can only reference notStrict () functions from the imported module.
IT Certification Guaranteed, The Easy Way!
39
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
- Access to all documents
- Unlimited textbook solutions
- 24/7 expert homework help
C.
Imported modules are in strict model whether you declare them as such or not.
D.
Add the statement use strict = false, before any other statements In the module to enable not-
strict mode.
Answer:
B
NO.117
Universal Containers recently its new landing page to host crowd-function 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 included the same ad-library-item class. They are hidden by default, and they are
randomly displayed while the user navigation through the page.
Tired of all the ads, what can the developer do to temporarily and quickly remove them?
A.
Use the DOM inspector to prevent the load event to be fired.
B.
Use the browser console to execute a script that removes all the elements containing the class ad-
library-item.
C.
Use the DOM inspector to remove all the elements containing the call ad-library -item.
D.
Use the browser console to execute a script that prevents the load event to be fired.
Answer:
B
NO.118
Which three options show valid methods for creating a fat arrow function? 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:
A,C,E
NO.119
Refer to the following code that performs a basis mathematical operation on a provided
input:
How should line o2 be written to ensure that x evaluated to 6 in the line below?
Let x calculate (''g'');
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
IT Certification Guaranteed, The Easy Way!
40
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
- Access to all documents
- Unlimited textbook solutions
- 24/7 expert homework help
NO.120
Given the code block below:
What should a developer insert line 15 to output the following message using the load method?
SNENneziz is loading a cartridge game: super Monic 3x Force...
A.
Console116bit. 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
NO.121
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.
Empty string if the number is divisible by neither 3 or 5.
Which two test cases will properly test scenarios for the fizzbuss function?
A.
Let res = fizzbuss (3) ;
Console.assert (res === 'buzz' ) ;
B.
Let res = fizzbuss (Infinity);
Console.assert (res === '' ) ;
C.
Let res = fizzbuss (15) ;
Console. assert (res === 'fizzbuzz' ) ;
D.
Let res = fizzbuss (5) ;
Console. assert (res === '' ) ;
Answer:
B,C
NO.122
Refer to the code below:
What is the value of foobDienu1 after the code executes?
A.
{'Pizza' , Burger' , French fries ' , garlic bread; }
B.
{'Pizza' , Burger' , French fries '}
C.
{'Garlic bread', Pizza' , Burger' , French fries'}
D.
{'Garlic bread'}
IT Certification Guaranteed, The Easy Way!
41
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
- Access to all documents
- Unlimited textbook solutions
- 24/7 expert homework help
Answer:
A
NO.123
Refer to the code:
Given the code above, which three properties are set for pet1? Choose 3 answers
A.
canTalk
B.
speak
C.
name
D.
owner
E.
type
Answer:
A,C,E
NO.124
Refer to the code below:
Which code change should be made for the console to log only Row log when 'Click mel' is clicking?
A.
Add event,stopPropagation (); to window,onLoad event hadler.
B.
Add event,stopPropagation (); to printMessage function.
C.
Add event,stopPropagation (); to window.onLoad event hadler.
D.
Add event,stopPropagation (); to printMessage function.
Answer:
B,C
NO.125
Refer to the code snippet:
IT Certification Guaranteed, The Easy Way!
42
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
- Access to all documents
- Unlimited textbook solutions
- 24/7 expert homework help
What is the value of array after the code executes?
A.
1, 2, 3, 4, 5, 4, 4
B.
1, 2, 3, 4, 4, 5, 4
C.
1, 2, 3, 5
D.
1, 2, 3, 4, 5, 4
Answer:
C
NO.126
Refer to the code below:
What is the output if this function when called with an empty array?
A.
Retruns 0
B.
Throws an error
C.
Return 10
D.
Return NaN
Answer:
C
NO.127
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)
IT Certification Guaranteed, The Easy Way!
43
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
- Access to all documents
- Unlimited textbook solutions
- 24/7 expert homework help
B)
C)
A.
Option A
B.
Option B
C.
Option C
D.
Option D
Answer:
D
NO.128
A developer wants to create a simple image upload in the browser using the File API. The
HTML is below:
The JavaScript portion is:
IT Certification Guaranteed, The Easy Way!
44
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
- Access to all documents
- Unlimited textbook solutions
- 24/7 expert homework help
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, readerAsDataURL (file) ;
D.
04 const reader = new FileReader ( ) ;
08 if (file) reader , createAsDataURL (file) ;
Answer:
A
NO.129
Refer to the code below:
What are the values for first and second once the executes?
A.
First is why and second is when.
B.
First is why and second is where.
C.
First is who and second is when.
D.
First is who and second is where.
Answer:
B
NO.130
Refer to the code below:
What is the result of running line 05?
A.
aPromise and bPromise run sequentially.
B.
Neither aPromise or bPromise runs.
IT Certification Guaranteed, The Easy Way!
45
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
- Access to all documents
- Unlimited textbook solutions
- 24/7 expert homework help
C.
Apromise and bpromise run in parallel.
D.
Only apromise runs.
Answer:
B
NO.131
Refer to the code below:
What is the output after the ode executes successfully?
A.
End
Start
Success
B.
Start
Success
End
C.
Start
End
Success
D.
Success
Start
End
Answer:
B
NO.132
Refer to the code below:
What is display when the cod executes?
A.
ReferenceError: b is not defined
B.
A
C.
Undefined
D.
null
Answer:
B
NO.133
Refer to the code below:
IT Certification Guaranteed, The Easy Way!
46
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
- Access to all documents
- Unlimited textbook solutions
- 24/7 expert homework help
After running this code, which result is displayed on the console?
A.
> True
> False
B.
> 5
> Undefined
C.
> 5
>- 1
D.
> 5
> 0
Answer:
C
NO.134
Refer to the following array:
Let arr1 = [1, 2, 3, 4, 5];
Which two lines of codes result in a second array, arr2, being created such that arr2 is not a reference
to arr1? Choose 2 answers
A.
Let arr2 = arr1 .slice (0, 5);
B.
Let arr2 = Array. From (arr1) ;
C.
Let arr2 = arr1;
D.
Let arr2 = arr1 sort ();
Answer:
C,D
NO.135
Refer to the code below:
let productSKU = '8675309,;
A developer has a requirement to generate SKU numbers that are always 10 characters log, starting
with 'sku', and padded with zeros.
Which statement assigned the value skuooooooooo86675309?
A.
productSKU = productSKU. Padstart (19, '0' padstart ('sku') ;
B.
productSKU = productSKU. PadEnd (16, '0' padstart ('sku') ;
C.
productSKU = productSKU. PadEnd (16, '0' padstart (19, 'sku') ;
D.
productSKU = productSKU. Padstart (16, '0' padstart (19, 'sku') ;
Answer:
D
NO.136
Refer to the HTML below:
IT Certification Guaranteed, The Easy Way!
47
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
- Access to all documents
- Unlimited textbook solutions
- 24/7 expert homework help
Which JavaScript statement results in changing ''Tony'' to ''Mr. T. ''?
A.
Document.querySelectorAll ('#main # TONY ') , innerHTML = Mr, T , ' ;
B.
Document.querySelector (' '#main li:second-child') innerHTML, = Mr, T, ';
C.
Document.querySelectorAll ( '#main li, Tony ' ) innerHTNL = Mr, T , ' ;
D.
Document.querySelector (''#main li:nth-child (2) ') , innerHTML = 'Mr . T ';
Answer:
A
NO.137
Refer to the code below:
Which two statements correctly execute the runparallel () function?
Choose 2 answers
A.
Async runParalled (). Then (data) :
B.
runParallel () , done (function ( data)(return data; }};
C.
runParralel () . then (data );
D.
runParallel () , then (function ) (date) { } 0;
Answer:
A,D
NO.138
A developer receives a comment from the Tech lead that the code below gives an error.
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:
C
NO.139
A developer has the function, shown below, that is called when a page loads.
Where can the developer see the log statement after loading the page in the browser?
A.
Terminal running the web server.
B.
Browser performance tools
C.
Browser javaScript console
IT Certification Guaranteed, The Easy Way!
48
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
- Access to all documents
- Unlimited textbook solutions
- 24/7 expert homework help
D.
On the webpage
Answer:
C
NO.140
Refer to the following code:
Let sampletext = 'The quick brown fox Jumps';
A developer need to determine if a certain substring is part of a string.
Which three expressions return true for the give substring? Choose 3 answers
A.
sampleText.inclides (fox');
B.
sampleText.includes (quick', 4);
C.
sampleText.includes (fox' , 3);
D.
sampleText.substing ('fox');
E.
sampleText.indexof ('quick') 1== -1;
Answer:
C
NO.141
Which option is a core Node;js module?
A.
Path
B.
Ios
C.
Memory
D.
locale
Answer:
A,B
NO.142
A developer writes the code below to calculate the factorial of a given number.
What is the result of executing line 04?
A.
0
B.
6
C.
-Infinity
D.
RuntimeError
Answer:
D
NO.143
Refer to the code below:
What are the value of objBook and newObBook respectively?
A.
( Title: JavaScript'')
( Title: JavaScript'')
IT Certification Guaranteed, The Easy Way!
49
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
- Access to all documents
- Unlimited textbook solutions
- 24/7 expert homework help
B.
author: ''Robert title ''javaScript'' ) undefined
C.
( author: ''Robert'', title JavaScript'' )
( author: ''Robert'', title JavaScript'' )
D.
(author: ''Robert'' )
(Author: ''Robert '', title: JavaScript'')
Answer:
B
NO.144
Refer to the code below:
A developer uses a client that makes a GET request that uses a promise to handle the request,
getRequest returns a promise.
Which code modification can the developer make to gracefully handle an error?
A)
B)
C)
D)
IT Certification Guaranteed, The Easy Way!
50
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
- Access to all documents
- Unlimited textbook solutions
- 24/7 expert homework help
A.
Option A
B.
Option B
C.
Option C
D.
Option D
Answer:
A
NO.145
Refer to the code below:
Why does the function bar have access to variable =?
A.
Inner function's scope
B.
Hoisting
C.
Outer function's scope
D.
Prototype chain
Answer:
A
IT Certification Guaranteed, The Easy Way!
51
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
- Access to all documents
- Unlimited textbook solutions
- 24/7 expert homework help
Recommended textbooks for you

EBK JAVA PROGRAMMING
Computer Science
ISBN:9781337671385
Author:FARRELL
Publisher:CENGAGE LEARNING - CONSIGNMENT

C++ Programming: From Problem Analysis to Program...
Computer Science
ISBN:9781337102087
Author:D. S. Malik
Publisher:Cengage Learning

EBK JAVA PROGRAMMING
Computer Science
ISBN:9781305480537
Author:FARRELL
Publisher:CENGAGE LEARNING - CONSIGNMENT

C++ for Engineers and Scientists
Computer Science
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Course Technology Ptr

Microsoft Visual C#
Computer Science
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Cengage Learning,

Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:9781337102124
Author:Diane Zak
Publisher:Cengage Learning
Recommended textbooks for you
- EBK JAVA PROGRAMMINGComputer ScienceISBN:9781337671385Author:FARRELLPublisher:CENGAGE LEARNING - CONSIGNMENTC++ Programming: From Problem Analysis to Program...Computer ScienceISBN:9781337102087Author:D. S. MalikPublisher:Cengage LearningEBK JAVA PROGRAMMINGComputer ScienceISBN:9781305480537Author:FARRELLPublisher:CENGAGE LEARNING - CONSIGNMENT
- C++ for Engineers and ScientistsComputer ScienceISBN:9781133187844Author:Bronson, Gary J.Publisher:Course Technology PtrMicrosoft Visual C#Computer ScienceISBN:9781337102100Author:Joyce, Farrell.Publisher:Cengage Learning,Programming with Microsoft Visual Basic 2017Computer ScienceISBN:9781337102124Author:Diane ZakPublisher:Cengage Learning

EBK JAVA PROGRAMMING
Computer Science
ISBN:9781337671385
Author:FARRELL
Publisher:CENGAGE LEARNING - CONSIGNMENT

C++ Programming: From Problem Analysis to Program...
Computer Science
ISBN:9781337102087
Author:D. S. Malik
Publisher:Cengage Learning

EBK JAVA PROGRAMMING
Computer Science
ISBN:9781305480537
Author:FARRELL
Publisher:CENGAGE LEARNING - CONSIGNMENT

C++ for Engineers and Scientists
Computer Science
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Course Technology Ptr

Microsoft Visual C#
Computer Science
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Cengage Learning,

Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:9781337102124
Author:Diane Zak
Publisher:Cengage Learning