JavaScript-Developer-I 無料問題集「Salesforce Certified JavaScript Developer I」

Refer to the following code:
Let sampleText = 'The quick brown fox jumps';
A developer needs to determine if a certainsubstring is part of a string.
Which three expressions return true for the given substring ?
Choose 3 answers

正解:A、B、D 解答を投票する
Refer to HTML below:
<div id ="main">
<div id = " card-00">This card is smaller.</div>
<div id = "card-01">The width and height of this card is determined by its contents.</div>
</div>
Which expression outputs the screen width of the element with the ID card-01?

Refer to the code below:
let o = {
get js() {
let city1 = String("st. Louis");
let city2 = String(" New York");
return {
firstCity: city1.toLowerCase(),
secondCity: city2.toLowerCase(),
}
}
}
What value can a developer expect when referencing o.js.secondCity?

Refer to the code below:
Const searchTest = 'Yay! Salesforce is amazing!" ;
Let result1 = searchText.search(/sales/i);
Let result 21 = searchText.search(/sales/i);
console.log(result1);
console.log(result2);
After running this code, which result is displayed on the console?

Refer to the following code:
function test (val) {
If (val === undefined) {
return 'Undefined values!' ;
}
if (val === null) {
return 'Null value! ';
}
return val;
}
Let x;
test(x);
What is returned by the function call on line 13?

Which javascript methods can be used to serialize an object into a string and deserialize a JSON string into an object, respectively?

A developer is creating a simple webpage with a button. When a userclicks this button for the first time, a message is displayed.
The developer wrote the JavaScript code below, but something is missing. The message gets displayed every time a user clicks the button, instead of just the first time.
01 functionlisten(event) {
02 alert ( 'Hey! I am John Doe') ;
03 button.addEventListener ('click', listen);
Which two code lines make this code work as required?
Choose 2 answers

正解:A、B 解答を投票する
A developer wrote a fizzbuzz function thatwhen passed in a number, returns the following:
'Fizz' if the number is divisible by 3.
'Buzz' if the number is divisible by 5.
'Fizzbuzz' if the number is divisible by both 3 and 5.
Empty string if the number is divisible by neither 3 or 5.
Whichtwo test cases will properly test scenarios for the fizzbuzz function?
Choose 2 answers

正解:A、C、D 解答を投票する
Considering type coercion, what does the following expression evaluate to?
True + '13' + NaN

Given the JavaScript below:

Which code should replace the placeholder comment on line 05 to highlight accounts that match the search string'

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 ?

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?

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?

Which two console logs output NaN?
Choose 2 answers | |

正解:A、B 解答を投票する
Refer to the code snippet below:
Let array = [1, 2, 3, 4, 4, 5, 4, 4];
For (let i =0; i <array.length; i++){
if (array[i] === 4) {
array.splice(i, 1);
}
}
What is the value of the array after the code executes?

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?

弊社を連絡する

我々は12時間以内ですべてのお問い合わせを答えます。

オンラインサポート時間:( UTC+9 ) 9:00-24:00
月曜日から土曜日まで

サポート:現在連絡