良質なCRT-600のPDF問題集でCRT-600試験問題を試せます [Q20-Q43]

Share

良質なCRT-600のPDF問題集でCRT-600試験問題を試せます

一番最新のSalesforce CRT-600試験問題集PDF2022年更新


Salesforce CRT-600 認定試験の出題範囲:

トピック出題範囲
トピック 1
  • オブジェクトの作成、オブジェクトプロトタイプ、関数の定義
トピック 2
  • 型変換(明示的および暗黙的)
  • JSONの操作
  • データ型と変数
トピック 3
  • JavaScriptの基本
  • 文字列、数値、および日付の操作
トピック 4
  • ブラウザとイベント
  • ドキュメントオブジェクトモデル
  • ブラウザ開発ツール
トピック 5
  • Node.js、Node.jsライブラリでのサーバー側JavaScriptデバッグ
トピック 6
  • 非同期プログラミング
  • コールバック関数
  • PromisesとAsync
  • Await

 

質問 20
A developer receives a comment from the Tech Lead that the code given below has error:
const monthName = 'July';
const year = 2019;
if(year === 2019) {
monthName = 'June';
}
Which line edit should be made to make this code run?

  • A. 01 let monthName ='July';
  • B. 03 if (year == 2019) {
  • C. 02 const year = 2020;
  • D. 02 let year =2019;

正解: A

 

質問 21
Refer to code below:
function Person() {
this.firstName = 'John';
}
Person.prototype ={
Job: x => 'Developer'
};
const myFather = new Person();
const result =myFather.firstName + ' ' + myFather.job();
What is the value of the result after line 10 executes?

  • A. John undefined
  • B. Error: myFather.job is not a function
  • C. Undefined Developer
  • D. John Developer

正解: D

 

質問 22
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?

  • A. 2 2 2 2
  • B. 2 2 undefined undefined
  • C. 2 2 1 1
  • D. 2 2 1 2

正解: D

 

質問 23
A developer creates an object where its properties should be immutable and prevent properties from being added or modified.
Which method should be used to execute this business requirement ?

  • A. Object.const()
  • B. Object.eval()
  • C. Object.lock()
  • D. Object.freeze()

正解: D

 

質問 24
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 array after the code executes?

  • A. [1, 2, 3, 4, 5, 4, 4]
  • B. [1, 2, 3, 4, 4, 5, 4]
  • C. [1, 2, 3, 4, 5, 4]
  • D. [1, 2, 3, 5]

正解: B

 

質問 25
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 the search string?

  • A. ' Block ' : ' none '
  • B. ' visible ' : ' hidden '
  • C. ' hidden ' : ' visible '
  • D. ' name ' : ' block '

正解: A

 

質問 26
Refer to the code below:
const addBy = ?
const addByEight =addBy(8);
const sum = addBYEight(50);
Which two functions can replace line 01 and return 58 to sum?
Choose 2 answers

  • A. const addBy = function(num1){
    return num1 + num2;
    }
  • B. const addBy = function(num1){
    return function(num2){
    return num1 + num2;
    }
  • C. const addBy = (num1) => num1 + num2 ;
  • D. const addBY = (num1) => (num2) => num1 + num2;

正解: B,D

 

質問 27
Given the code below:
Function myFunction(){
A =5;
Var b =1;
}
myFunction();
console.log(a);
console.log(b);
What is the expected output?

  • A. Both lines 08 and 09 are executed, and the variables are outputted.
  • B. Both lines 08 and 09 are executed, but values outputted are undefined.
  • C. Line 08 outputs the variable, but line 09 throws an error.
  • D. Line 08 thrones an error, therefore line 09 is never executed.

正解: C

 

質問 28
A developer has the function, shown below, that is called when a page loads.
function onload() {
console.log("Page has loaded!");
}
Where can the developer see the log statement after loading the page in the browser?

  • A. On the webpage.
  • B. Browser performance toots
  • C. Terminal running the web server.
  • D. Browser javaScript console

正解: D

 

質問 29
Which function should a developer use to repeatedly execute code at a fixed interval ?

  • A. setTimeout
  • B. setPeriod
  • C. setIntervel
  • D. setInteria

正解: C

 

質問 30
Which three actions can be using the JavaScript browser console?
Choose 3 answers:

  • A. View and change security cookies.
  • B. view , change, and debug the JavaScript code of the page.
  • C. Run code that is not related to page.
  • D. View and change DOM the page.
  • E. Display a report showing the performance of a page.

正解: B,C,D

 

質問 31
A developer wants to leverage a module to print a price in pretty format, and has imported a method as shown below:
Import printPrice from '/path/PricePrettyPrint.js';
Based on the code, what must be true about the printPrice function of the PricePrettyPrint module for this import to work ?

  • A. printPrice must be be a named export
  • B. printPrice must be the default export
  • C. printPrice must be an all export
  • D. printPrice must be a multi exportc

正解: B

 

質問 32
A developer is setting up a new Node.js server with a client library that is built using events and callbacks.
The library:
* Will establish a web socket connection and handle receipt of messages to the server
* Will be imported with require, and made available with a variable called we.
The developer also wants to add error logging if a connection fails.
Given this info, which code segment shows the correct way to set up a client with two events that listen at execution time?

  • A. try{
    ws.connect (( ) => {
    console.log('connected to client'); });
    } catch(error) { console.log('ERROR' , error); };
    }
  • B. ws.connect (( ) => {
    console.log('connected to client'); }).catch((error) => { console.log('ERROR' , error); }};
  • C. ws.on ('connect', ( ) => {
    console.log('connected to client'); ws.on('error', (error) => { console.log('ERROR' , error); });
    });
  • D. ws.on ('connect', ( ) => { console.log('connected to client'); }}; ws.on('error', (error) => { console.log('ERROR' , error); }};

正解: D

 

質問 33
Which statement accurately describes an aspect of promises?

  • A. In a.then() function, returning results is not necessary since callbacks will catch the result of a previous promise.
  • B. .then() cannot be added after a catch.
  • C. .then() manipulates and returns the original promise.
  • D. Arguments for the callback function passed to .then() are optional.

正解: D

 

質問 34
Refer to the code below:
Async funct on functionUnderTest(isOK) {
If (isOK) return 'OK' ;
Throw new Error('not OK');
)
Which assertion accuretely tests the above code?

  • A. Console.assert (await functionUnderTest(true), ' OK ')
  • B. Console.assert (await functionUnderTest(true), ' not OK ')
  • C. Console.assert (await functionUnderTest(true), 'OK')
  • D. Console.assert (await functionUnderTest(true), ' not OK ')

正解: C

 

質問 35
Refer to the code below:
for(let number =2 ; number <= 5 ; number += 1 ) {
// insert code statement here
}
The developer needs to insert a code statement in the location shown. The code statement has these requirements:
1. Does require an import
2. Logs an error when the boolean statement evaluates to false
3. Works in both the browser and Node.js
Which meet the requirements?

  • A. console.assert(number % 2 === 0);
  • B. console.debug(number % 2 === 0);
  • C. assert (number % 2 === 0);
  • D. console.error(number % 2 === 0);

正解: D

 

質問 36
A developer wants to iterate through an array of objects and count the objects and count the objects whose property value, name, starts with the letter N.
Const arrObj = [{"name" : "Zach"} , {"name" : "Kate"},{"name" : "Alise"},{"name" : "Bob"},{"name" :
"Natham"},{"name" : "nathaniel"}
Refer to the code snippet below:
01 arrObj.reduce(( acc, curr) => {
02 //missing line 02
02 //missing line 03
04 ). 0);
Which missing lines 02 and 03 return the correct count?

  • A. Const sum = curr.startsWith('N') ? 1: 0;
    Return acc +sum
  • B. Const sum = curr.startsWIth('N') ? 1: 0;
    Return curr+ sum
  • C. Const sum = curr.name.startsWIth('N') ? 1: 0;
    Return curr+ sum
  • D. Const sum = curr.name.startsWith('N') ? 1: 0;
    Return acc +sum

正解: D

 

質問 37
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?

  • A. Hello John DOe
  • B. TypeError: dan.name is not a function
  • C. Hello Dan Doe
  • D. TypeError: Assignment to constant variable.

正解: B

 

質問 38
GIven a value, which three options can a developer use to detect if the value is NaN?
Choose 3 answers !

  • A. value === Number.NaN
  • B. Object.is(value, NaN)
  • C. value ! == value
  • D. value == NaN
  • E. Number.isNaN(value)

正解: D,E

 

質問 39
developer wants to use a module named universalContainersLib and them call functions from it.
How should a developer import every function from the module and then call the fuctions foo and bar ?

  • A. import * from '/path/universalContaineraLib.js';
    universalContainersLib.foo();
    universalContainersLib.bar();
  • B. import all from '/path/universalContaineraLib.js';
    universalContainersLib.foo();
    universalContainersLib.bar();
  • C. import * ad lib from '/path/universalContainersLib.js';
    lib.foo();
    lib.bar();
  • D. import (foo, bar) from '/path/universalContainersLib.js';
    foo();
    bar();

正解: C

 

質問 40
A developer creates a simple webpage with an input field. When a user enters text in the input field and clicks the button, the actual value of the field must be displayed in the console.
Here is the HTML file content:
<input type =" text" value="Hello" name ="input">
<button type ="button" >Display </button> The developer wrote the javascript code below:
Const button = document.querySelector('button');
button.addEvenListener('click', () => (
Const input = document.querySelector('input');
console.log(input.getAttribute('value'));
When the user clicks the button, the output is always "Hello".
What needs to be done to make this code work as expected?

  • A. Replace line 04 with console.log(input .value);
  • B. Replace line 02 with button.addCallback("click", function() {
  • C. Replace line 03 with const input = document.getElementByName('input');
  • D. Replace line 02 with button.addEventListener("onclick", function() {

正解: A

 

質問 41
Which statement accurately describes the behaviour of the async/ await keyworks ?

  • A. The associated sometimes returns a promise.
  • B. The associated function can only be called via asynchronous methods
  • C. The associated class contains some asynchronous functions.
  • D. The associated function will always return a promise

正解: D

 

質問 42
Refer to the code below:
Const resolveAfterMilliseconds = (ms) => Promise.resolve (
setTimeout (( => console.log(ms), ms ));
Const aPromise = await resolveAfterMilliseconds(500);
Const bPromise = await resolveAfterMilliseconds(500);
Await aPromise, wait bPromise;
What is the result of running line 05?

  • A. Only aPromise runs.
  • B. aPromise and bPromise run in parallel.
  • C. aPromise and bPromise run sequentially.
  • D. Neither aPromise or bPromise runs.

正解: D

 

質問 43
......

100%無料Salesforce Certified CRT-600問題集PDFお試しサンプル認定ガイドカバー率:https://www.goshiken.com/Salesforce/CRT-600-mondaishu.html