최신 JavaScript-Developer-I 무료덤프 - Salesforce Certified JavaScript Developer I

A developer wants to use a try...catch statement to catch any error that countSheep () may throw and pass it to a handleError () function.
What is the correct implementation of the try...catch?

정답: A
Given two expressions var1 and var2. What are two valid ways to return the logical AND of the two expressions and ensure it is data type Boolean ?
Choose 2 answers:

정답: A,D
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:
Let res = sum2([1, 2, 3 ]) ;
console.assert(res === 6 );
Res = sum3([ 1, 2, 3, 4]);
console.assert(res=== 6);
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

정답: A,B
Refer to the code below:
Let inArray =[ [ 1, 2 ] , [ 3, 4, 5 ] ];
Which two statements result in the array [1, 2, 3, 4, 5] ?
Choose 2 answers

정답: C,D
Referto 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?

정답: B
Universal Containers recently launched its new landing page to host a crowd-funding 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 insidethe DOM, like the one in the code below:

All the elements includes the same ad-library-item class, They are hidden by default, and they are randomly displayed while the user navigates through the page.

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

정답: B
Universal Containers (UC) just launched anew 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?

정답: C
Refer to the following code block:

What is the console output?

정답: D
At Universal Containers, every team has its own way of copying JavaScript objects. The code Snippet shows an implementation from one team:
Function Person() {
this.firstName = "John";
this.lastName = 'Doe';
This.name =() => (
console.log('Hello $(this.firstName) $(this.firstName)');
)}
Const john = new Person ();
Const dan =JSON.parse(JSON.stringify(john));
dan.firstName ='Dan';
dan.name();
What is the Output of the code execution?

정답: B
Given the code below:
FunctionmyFunction(){
A =5;
Var b =1;
}
myFunction();
console.log(a);
console.log(b);
What is the expected output?

정답: D
Consider type coercion, what does the following expression evaluate to?
True + 3 + '100' + null

정답: B
Given the HTML below:

Which statement adds the priority-account css class to the Applied Shipping row?
정답:
document.querySelector('#row-as').classList.add('priority-account');
Refer to the code below:
function changeValue(param) {
Param =5;
}
Let a =10;
Let b =5;
changeValue(b);
Const result = a+ " - "+ b;
What is the value of result when code executes?

정답: D
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,D
A developer wants to define a function log to be used a few times on a single-file JavaScript script.
01 // Line 1 replacement
02 console.log('"LOG:', logInput);
03 }
Which two options can correctly replaceline 01 and declare the function for use?
Choose 2 answers

정답: A,B
Refer the code below.
x=3.14;
function myfunction() {
"use strict";
y=x;
}
z=x;
myFunction();
정답:
Z is equal to 3.14
Use strict has effect only on line 5.
Line 5 throws an error
A developer has two ways to write a function:
Option A:
function Monster() {
This.growl = () => {
Console.log ("Grr!");
}
}
Option B:
function Monster() {};
Monster.prototype.growl =() => {
console.log("Grr!");
}
After deciding on an option, the developer creates 1000 monster objects.
How many growl methods are created with Option A Option B?

정답: A
What is the result of the code block?

정답: A
Given the JavaScript below:
01 function filterDOM (searchString) {
02 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?

정답: B

우리와 연락하기

문의할 점이 있으시면 메일을 보내오세요. 12시간이내에 답장드리도록 하고 있습니다.

근무시간: ( UTC+9 ) 9:00-24:00
월요일~토요일

서포트: 바로 연락하기