최신 JavaScript-Developer-I 무료덤프 - Salesforce Certified JavaScript Developer I
Refer to the code below:
Considering that JavaScript is single-threaded, what is the output of line 08 after the code executes?
Considering that JavaScript is single-threaded, what is the output of line 08 after the code executes?
정답: B
A developer writes the code below to calculate the factorial of a given number function sum(number){ return number * sum(number-1);
}
sum(3);
what is the result of executing the code.
}
sum(3);
what is the result of executing the code.
정답: C
Which code statement correctly retrieves and returns an object from localStorage?
정답: A
A developer needs to test this function:
01const sum3 = (arr) => (
02if (!arr.length) return 0,
03if (arr.length === 1) return arr[0],
04if (arr.length === 2) return arr[0]+ arr[1],
05 return arr[0] + arr[1] + arr[2],
06 );
Which two assert statements are valid tests for the function?
Choose 2 answers
01const sum3 = (arr) => (
02if (!arr.length) return 0,
03if (arr.length === 1) return arr[0],
04if (arr.length === 2) return arr[0]+ arr[1],
05 return arr[0] + arr[1] + arr[2],
06 );
Which two assert statements are valid tests for the function?
Choose 2 answers
정답: B,C
A team that works on a big project uses npm to deal with projects dependencies.
A developer added a dependency does not get downloaded when they execute npm install.
Which two reasons could be possible explanations for this?
Choose 2 answers
A developer added a dependency does not get downloaded when they execute npm install.
Which two reasons could be possible explanations for this?
Choose 2 answers
정답: A,C,D
Refer to the code below:
Line 05 causes an error.
What are the values of greeting and salutation once code completes?
Line 05 causes an error.
What are the values of greeting and salutation once code completes?
정답: B
Refer to the following code:
Which statement should be added to line 09 for the code to display. The boat has a capacity of 10 people?
Which statement should be added to line 09 for the code to display. The boat has a capacity of 10 people?
정답: B
Given the code below:
const delay = sync delay => {
Return new Promise((resolve, reject) => {
setTimeout (resolve,delay);});};
const callDelay =async () =>{
const yup =await delay(1000);
console.log(1);
What is logged to the console?
const delay = sync delay => {
Return new Promise((resolve, reject) => {
setTimeout (resolve,delay);});};
const callDelay =async () =>{
const yup =await delay(1000);
console.log(1);
What is logged to the console?
정답: C
Refer to the code declarations below:
Which three expressions return the string JavaScript?
Choose 3 answers
Which three expressions return the string JavaScript?
Choose 3 answers
정답: A,C,D
Refer to code below:
Const objBook = {
Title: 'Javascript',
};
Object.preventExtensions(objBook);
Const newObjBook = objBook;
newObjectBook.author ='Robert';
What are the values of objBook and newObjBook respectively ?
Const objBook = {
Title: 'Javascript',
};
Object.preventExtensions(objBook);
Const newObjBook = objBook;
newObjectBook.author ='Robert';
What are the values of objBook and newObjBook respectively ?
정답: D
Refer to the following code:
<html lang="en">
<body>
<divonclick = "console.log('Outer message') ;">
<button id ="myButton">CLick me<button>
</div>
</body>
<script>
function displayMessage(ev) {
ev.stopPropagation();
console.log('Inner message.');
}
const elem = document.getElementById('myButton');
elem.addEventListener('click' , displayMessage);
</script>
</html>
What will the console show when the button is clicked?
<html lang="en">
<body>
<divonclick = "console.log('Outer message') ;">
<button id ="myButton">CLick me<button>
</div>
</body>
<script>
function displayMessage(ev) {
ev.stopPropagation();
console.log('Inner message.');
}
const elem = document.getElementById('myButton');
elem.addEventListener('click' , displayMessage);
</script>
</html>
What will the console show when the button is clicked?
정답: D
Refer to the string below:
const str = 'Salesforce';
Which two statements result in the word 'Sales'?
Choose 2 answers
const str = 'Salesforce';
Which two statements result in the word 'Sales'?
Choose 2 answers
정답: C,D