최신 JavaScript-Developer-I 무료덤프 - Salesforce Certified JavaScript Developer I
Given the code below:
const delay = async delay =>{
return new Promise((resolve,reject)=>{
console.log(1);
setTimeout(resolve,deleay);
});
};
const callDelay =async ()=>{
console.log(2);
const yup = await delay(1000);
console.log(3);
}
console.log(4);
callDelay();
console.log(5);
What is logged to the console?
const delay = async delay =>{
return new Promise((resolve,reject)=>{
console.log(1);
setTimeout(resolve,deleay);
});
};
const callDelay =async ()=>{
console.log(2);
const yup = await delay(1000);
console.log(3);
}
console.log(4);
callDelay();
console.log(5);
What is logged to the console?
정답:
4 2 1 5 3
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 lackof the new keyword on line 02?
Function Monster() { this.name = 'hello' };
Const z = Monster();
What happens due to lackof the new keyword on line 02?
정답: D
Given the following code:

What is the output of line 02?

What is the output of line 02?
정답: C
Given the following code:

What will be the first four numbers logged?

What will be the first four numbers logged?
정답: B
Refer to the following code block:
class Animal{
constructor(name){
this.name = name;
}
makeSound(){
console.log(`${this.name} ismaking a sound.`)
}
}
class Dog extends Animal{
constructor(name){
super(name)
this.name = name;
}
makeSound(){
console.log(`${this.name} is barking.`)
}
}
let myDog = new Dog('Puppy');
myDog.makeSound();
What is the console output?
class Animal{
constructor(name){
this.name = name;
}
makeSound(){
console.log(`${this.name} ismaking a sound.`)
}
}
class Dog extends Animal{
constructor(name){
super(name)
this.name = name;
}
makeSound(){
console.log(`${this.name} is barking.`)
}
}
let myDog = new Dog('Puppy');
myDog.makeSound();
What is the console output?
정답:
Puppy is barking
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?
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?
정답: C
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?
Following semantic versioning format, what should the new package version number be?
정답: C
In which situation should a developer include a try .. catch block around their function call ?
정답: B
A developer at Universal Containers is creating their new landing page based on HTML, CSS, and JavaScript.
To ensure that visitors have a good experience, a script named personalizeWebsiteContent needs to be executed when the webpage is fully loaded (HTML content and all related files), in order to do some custom initializations.
Which implementation should be used to call Fe:s:-a;::eHec5;te::.-.ter.: based on the business requirement above?
To ensure that visitors have a good experience, a script named personalizeWebsiteContent needs to be executed when the webpage is fully loaded (HTML content and all related files), in order to do some custom initializations.
Which implementation should be used to call Fe:s:-a;::eHec5;te::.-.ter.: based on the business requirement above?
정답: D
A developer is trying to handle an error within a function.
Which code segment shows the correct approach to handle an error without propagating it elsewhere?
Which code segment shows the correct approach to handle an error without propagating it elsewhere?
정답: D
Given the code below:
const copy = JSON.stringify([ newString(' false '), new Bollean( false ), undefined ]); What is the value of copy?
const copy = JSON.stringify([ newString(' false '), new Bollean( false ), undefined ]); What is the value of copy?
정답: A
A developer is required to write a function that calculates the sum of elements in an array but is getting undefined every 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?
Const sumFunction = arr => {
Return arr.reduce((result, current) => {
//
Result += current;
//
), 10);
);
Which option makes the code work as expected?
정답: B
Refer to thefollowing code that imports a module named utils:
import (foo, bar) from '/path/Utils.js';
foo() ;
bar() ;
Which two implementations of Utils.js export foo and bar such that the code above runs without error?
Choose 2 answers
import (foo, bar) from '/path/Utils.js';
foo() ;
bar() ;
Which two implementations of Utils.js export foo and bar such that the code above runs without error?
Choose 2 answers
정답: C,D
Refer to the following object:
const cat ={
firstName: 'Fancy',
lastName: ' Whiskers',
Get fullName() {
return this.firstName + ' ' + this.lastName;
}
};
How can a developer access the fullName property for cat?
const cat ={
firstName: 'Fancy',
lastName: ' Whiskers',
Get fullName() {
return this.firstName + ' ' + this.lastName;
}
};
How can a developer access the fullName property for cat?
정답: C
Refer to the code below:

Which replacement for the conditionalstatement on line 02 allows a developer to correctly determine that a specific element, myElement on the page had been clicked?

Which replacement for the conditionalstatement on line 02 allows a developer to correctly determine that a specific element, myElement on the page had been clicked?
정답:
event.target.id =='myElement'
Refer to the code below:

Which value can a developer expect when referencing country,capital,cityString?

Which value can a developer expect when referencing country,capital,cityString?
정답: B