Javascript-Developer - I - 1
Javascript-Developer - I - 1
JavaScript-Developer-I Dumps
https://www.certleader.com/JavaScript-Developer-I-dumps.html
NEW QUESTION 1
Which three browser specific APIs are available for developers to persist data between page loads ? Choose 3 answers
A. IIFEs
B. indexedDB
C. Global variables
D. Cookies
E. localStorage.
Answer: ABE
NEW QUESTION 2
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 number in the array, The test
passes:
A different developer made changes to the behavior of sum3 to instead sum all of the numbers present in the array. The test passes:
Which two results occur when running the test on the updated sum3 function ? Choose 2 answers
Answer: AD
NEW QUESTION 3
Given the following code: document.body.addEventListener(‘ click ’, (event) => { if (/* CODE REPLACEMENT HERE */) {
console.log(‘button clicked!’);
)
});
Which replacement for the conditional statement on line 02 allows a developer to correctly determine that a button on page is clicked?
A. Event.clicked
B. e.nodeTarget ==this
C. event.target.nodeName == ‘BUTTON’
D. button.addEventListener(‘click’)
Answer: C
NEW QUESTION 4
Which javascript methods can be used to serialize an object into a string and deserialize a JSON string into an object, respectively?
Answer: A
NEW QUESTION 5
A developer wrote the following code: 01 let X = object.value;
02
3 try {
4 handleObjectValue(X); 05 } catch (error) {
6 handleError(error);
7}
The developer has a getNextValue function to execute after handleObjectValue(), but does not want to execute getNextValue() if an error occurs.
How can the developer change the code to ensure thisbehavior?
Answer: D
NEW QUESTION 6
A developer writers the code below to calculate the factorial of a given number.
A. 6
B. -Infinity
C. RuntimeError
Answer: D
Explanation:
NEW QUESTION 7
Refer to the code below: FunctionPerson(firstName, lastName, eyecolor) { this.firstName =firstName;
this.lastName = lastName;
this.eyeColor = eyeColor;
}
Person.job = ‘Developer’;
const myFather = new Person(‘John’, ‘Doe’); console.log(myFather.job);
What is the output after the codeexecutes?
Answer: D
NEW QUESTION 8
developer publishes a new version of a package with new features 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
NEW QUESTION 9
Refer to the following object:
A. cat.fullName
B. cat.fullName()
C. cat.get.fullName
D. cat.function.fullName()
Answer: A
NEW QUESTION 10
Given the following code:
document.body.addEventListener(‘ click ’, (event) => { if (/* CODE REPLACEMENT HERE */) {
console.log(‘button clicked!’);
)
});
Which replacement for the conditional statement on line 02 allows a developer to correctly determine that a button on page is clicked?
A. Event.clicked
B. e.nodeTarget ==this
C. event.target.nodeName == ‘BUTTON’
D. button.addEventListener(‘click’)
Answer: C
NEW QUESTION 10
Given the code below:
A. 1 2 3
B. 1 3 2
C. 2 1 3
D. 2 3 1
Answer: D
NEW QUESTION 15
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 17
Refer to code below:
Let productSKU = ‘8675309’ ;
A developer has a requirement to generate SKU numbers that are always 19 characters lon, starting with ‘sku’,and padded with zeros.
Which statement assigns the values sku0000000008675309 ?
Answer: D
NEW QUESTION 20
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 23
Refer to the expression below: Let x = (‘1’ + 2) == (6 * 2);
How should this expression be modified to ensure that evaluates to false?
Answer: B
NEW QUESTION 28
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 29
developer uses the code below to format a date.
Answer: A
NEW QUESTION 31
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 33
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?
A. Assert
B. Log
C. Message
D. Info
E. Error
Answer: AD
NEW QUESTION 34
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 36
Why would a developer specify a package.jason as a developed forge instead of a dependency ?
Answer: B
NEW QUESTION 38
A developer creates a simple webpage with an input field. Whena 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:
Answer: A
NEW QUESTION 40
A developer is working on an ecommerce website where the delivery date is dynamically calculated based on the current day. 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 thisnew requirement?
Answer: A
NEW QUESTION 42
Which two console logs output NaN? Choose 2 answers | |
A. console.log(10 / Number('5) ) ;
B. console.log(parseInt ' ("two')) ;
C. console.log(10 / 0);
D. console.loeg(10 / 'five');
Answer: BD
NEW QUESTION 46
Which statement parses successfully?
A. JSO
B. parse (""foo"');
C. JSON.parse (""foo'");
D. JSON.parse ("foo");
E. JSON.parse ("foo");
Answer: A
NEW QUESTION 48
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 53
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.
Answer: BCD
NEW QUESTION 54
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?
Answer: A
NEW QUESTION 57
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?
Answer: D
NEW QUESTION 60
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
D. 0 1 2 2
Answer: C
NEW QUESTION 61
What is the result of the code block?
Answer: D
NEW QUESTION 64
Refer to the following array:
Let arr1 = [ 1, 2, 3, 4, 5 ];
Which two lines of code result in a second array, arr2 being created such that arr2 is not a reference to arr1?
Answer: AB
NEW QUESTION 67
......
100% Pass Your JavaScript-Developer-I Exam with Our Prep Materials Via below:
https://www.certleader.com/JavaScript-Developer-I-dumps.html