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?
A. 4 2 1 5 3
B. PlaceHolder
C. PlaceHolder
D. PlaceHolder
Given the HTML below:
Which statement adds the priority-account css class to the Applied Shipping row?
A. document.querySelector('#row-as').classList.add('priority-account');
B. PlaceHolder
C. PlaceHolder
D. PlaceHolder
Refer to the code below:
let car1 = new Promise((_ ,reject)=> setTimeout(reject,2000,"Car1 crashed in"));
let car2 = new Promise(resolve => setTimeout(resolve,1500,"Car2 completed"));
let car3 = new Promise(resolve => setTimeout(resolve,3000,"Car3 completed"));
Promise.race([car1,car2,car3])
.then(value=>{
let result = `${value} the race.`;
}).catch(err=>{
console.log('Race is cancelled.',err);
});
What is the valueof result when promise.race execues?
A. Car2 completed the race.
B. PlaceHolder
C. PlaceHolder
D. PlaceHolder
Refer to the string below.
Const str='Salesforce';
Which two statementsresults in the word 'Sales'?
A. Str.substring(0,5);
B. Str.substr(0,5);
C. PlaceHolder
D. PlaceHolder
CORRECT TEXT
Given the requirement to refactor the code above to JavaScript class format, which class definition is correct?
A. Option A
B. Option B
C. Option C
D. Option D
Refer to the following code block:
class Animal{
constructor(name){
this.name = name;
}
makeSound(){
console.log(`${this.name} is making 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?
A. Puppy is barking
B. PlaceHolder
C. PlaceHolder
D. PlaceHolder
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?
A. event.target.id =='myElement'
B. PlaceHolder
C. PlaceHolder
D. PlaceHolder
CORRECT TEXT Refer the following code
what is the value of array after code executes?
A. 1,2,3,5
B. PlaceHolder
C. PlaceHolder
D. PlaceHolder
A developer has an is Dog function that takes one argument cat. They want to schedule the function to run everyminute. What is the correct syntax for scheduling this function?
A. setInterval(isDog, 60000,'cat');
B. PlaceHolder
C. PlaceHolder
D. PlaceHolder
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 that x 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;
Nowadays, the certification exams become more and more important and required by more and more enterprises when applying for a job. But how to prepare for the exam effectively? How to prepare for the exam in a short time with less efforts? How to get a ideal result and how to find the most reliable resources? Here on Vcedump.com, you will find all the answers. Vcedump.com provide not only Salesforce exam questions, answers and explanations but also complete assistance on your exam preparation and certification application. If you are confused on your JAVASCRIPT-DEVELOPER-I exam preparations and Salesforce certification application, do not hesitate to visit our Vcedump.com to find your solutions here.