[2022年01月]更新のCRT-600認定実際の問題を提供します [Q38-Q61]

Share

[2022年01月]更新のCRT-600認定実際の問題を提供します

更新されたのはCRT-600問題集PDFでCRT-600リアル有効なブレーン問題集には160問があります!

質問 38
Refer to the code below:
01 const exec = (item, delay) =>{
02 new Promise(resolve => setTimeout( () => resolve(item), delay)),
03 async function runParallel() {
04 Const (result1, result2, result3) = await Promise.all{
05 [exec ('x', '100') , exec('y', 500), exec('z', '100')]
06 );
07 return `parallel is done: $(result1) $(result2)$(result3)`;
08 }
}
}
Which two statements correctly execute the runParallel () function?
Choose 2 answers

  • A. runParallel ( ). done(function(data){
    return data;
    });
  • B. Async runParallel () .then(data);
  • C. runParallel () .then(data);
  • D. runParallel () .then(function(data)
    return da

正解: A,D

 

質問 39
Refer to the code below:
Let car1 = new Promise((_ , reject) =>
setTimeout(reject, 2000, "car 1 crashed in" =>
Let car2 =new Promise(resolve => setTimeout(resolve, 1500, "car 2 completed") Let car3 =new Promise(resolve => setTimeout(resolve, 3000, "car 3 completed") Promise.race(( car1, car2, car3))
.then (value => (
Let result = '$(value) the race.';)}
.catch(arr => {
console.log("Race is cancelled.", err);
});
What is the value of result when Promise.race executes?

  • A. Car 2 completed the race.
  • B. Car 3 completes the race
  • C. Race is cancelled.
  • D. Car 1 crashed in the race.

正解: A

 

質問 40
Refer to code below:
Let productSKU = '8675309' ;
A developer has a requirement to generate SKU numbers that are always 19 characters lon, starting with 'sku', and padded with zeros.
Which statement assigns the values sku0000000008675309 ?

  • A. productSKU = productSKU .padEnd (16. '0').padstart('sku');
  • B. productSKU = productSKU .padEnd (16. '0').padstart(19, 'sku');
  • C. productSKU = productSKU .padStart (16. '0').padstart(19, 'sku');
  • D. productSKU = productSKU .padStart (19. '0').padstart('sku');

正解: C

 

質問 41
Which option is a core Node,js module?

  • A. Path
  • B. Memory
  • C. Ios
  • D. locate

正解: A

 

質問 42
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

 

質問 43
A class was written to represent items for purchase in an online store, and a second class Representing items that are on sale at a discounted price. THe constructor sets the name to the first value passed in. The pseudocode is below:
Class Item {
constructor(name, price) {
... // Constructor Implementation
}
}
Class SaleItem extends Item {
constructor (name, price, discount) {
...//Constructor Implementation
}
}
There is a new requirement for a developer to implement a description method that will return a brief description for Item and SaleItem.
Let regItem =new Item('Scarf', 55);
Let saleItem = new SaleItem('Shirt' 80, -1);
Item.prototype.description = function () { return 'This is a ' + this.name; console.log(regItem.description()); console.log(saleItem.description()); SaleItem.prototype.description = function () { return 'This is a discounted ' + this.name; } console.log(regItem.description()); console.log(saleItem.description()); What is the output when executing the code above ?

  • A. This is a Scarf
    Uncaught TypeError: saleItem.description is not a function
    This is aScarf
    This is a discounted Shirt
  • B. This is a Scarf
    This is a Shirt
    This is a Scarf
    This is a discounted Shirt
  • C. This is aScarf
    Uncaught TypeError: saleItem.description is not a function
    This is a Shirt
    This is a did counted Shirt
  • D. This is a Scarf
    This is a Shirt
    This is a discounted Scarf
    This is a discounted Shirt

正解: B

 

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

  • A. > true > false
  • B. > 5 > 0
  • C. > 5 > -1
  • D. > 5 >undefined

正解: D

 

質問 45
Refer to the code below:
Const myFunction = arr => {
Return arr.reduce((result, current) =>{
Return result = current;
}, 10};
}
What is the output of this function when called with an empty array ?

  • A. Returns 0
  • B. Returns NaN
  • C. Returns 10
  • D. Throws an error

正解: C

 

質問 46
developer creates a new web server that uses Node.js. It imports a server library that uses events and callbacks for handling server functionality.
The server library is imported with require and is made available to the code by a variable named server. The developer wants to log any issues that the server has while booting up.
Given the code and the information the developer has, which code logs an error at boost with an event?

  • A. Try{
    server.start();
    } catch(error) {
    console.log('ERROR', error);
    }
  • B. Server.error ((server) => {
    console.log('ERROR', error);
    });
  • C. Server.on ('error', (error) => {
    console.log('ERROR', error);
    });
  • D. Server.catch ((server) => {
    console.log('ERROR', error);
    });

正解: C

 

質問 47
Refer to the code below:
console.log(''start);
Promise.resolve('Success') .then(function(value){
console.log('Success');
});
console.log('End');
What is the output after the code executes successfully?

  • A. Start
    Success
    End
  • B. Start
    End
    Success
  • C. End
    Start
    Success
  • D. Success
    Start
    End

正解: B

 

質問 48
A developer is creating a simple webpage with a button. When a user clicks 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 function listen(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. On line 04, use event.stopPropagation ( ),
  • B. On line 02, use event.first to test if it is the first execution.
  • C. On line 06, add an option called once to button.addEventListener().
  • D. On line 04, use button.removeEventListener(' click" , listen);

正解: C,D

 

質問 49
A developer needs to test this function:
01 const sum3 = (arr) => (
02 if (!arr.length) return 0,
03 if (arr.length === 1) return arr[0],
04 if (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

  • A. console.assert(sum3(1, '2')) == 12);
  • B. console.assert(sum3(0)) == 0);
  • C. console.assert(sum3('hello', 2, 3, 4)) === NaN);
  • D. console.assert(sum3(-3, 2 )) == -1);

正解: A,D

 

質問 50
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

 

質問 51
Refer to the code below:

Line 05 causes an error.
What are the values of greeting and salutation once code completes?

  • A. Greeting is Hello and salutation is Hello, Hello.
  • B. Greeting is Goodbye and salutation is I say Hello.
  • C. Greeting is Goodbye and salutation is Hello, Hello.
  • D. Greeting is Hello and salutation is I say hello.

正解: A

 

質問 52
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;

正解: A

 

質問 53
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. The developer missed the option --save when adding the dependency.
  • B. The developer added the dependency as a dev dependency, and
    NODE_ENV
    Is set to production.
  • C. The developer missed the option --add when adding the dependency.
  • D. The developer added the dependency as a dev dependency, and NODE_ENV is set to production.

正解: A,B,D

 

質問 54
The developer wants to test the array shown:
const arr = Array(5).fill(0)
Which two tests are the most accurate for this array ?
Choose 2 answers:

  • A. console.assert(arr[0] === 0 && arr[ arr.length] === 0);
  • B. console.assert (arr.length >0);
  • C. arr.forEach(elem => console.assert(elem === 0)) ;
  • D. console.assert( arr.length === 5 );

正解: C,D

 

質問 55
Which three browser specific APIs are available for developers to persist data between page loads ?
Choose 3 answers

  • A. IIFEs
  • B. Global variables
  • C. indexedDB
  • D. localStorage.
  • E. Cookies

正解: A,C,D

 

質問 56
Refer to the following code:
01 function Tiger(){
02 this.Type = 'Cat';
03 this.size = 'large';
04 }
05
06 let tony = new Tiger();
07 tony.roar = () =>{
08 console.log('They\'re great1');
09 };
10
11 function Lion(){
12 this.type = 'Cat';
13 this.size = 'large';
14 }
15
16 let leo = new Lion();
17 //Insert code here
18 leo.roar();
Which two statements could be inserted at line 17 to enable the function call on line 18?
Choose 2 answers.

  • A. Object.assign(leo,Tiger);
  • B. Object.assign(leo,tony);
  • C. Leo.prototype.roar = () => { console.log('They\'re pretty good:'); };
  • D. Leo.roar = () => { console.log('They\'re pretty good:'); };

正解: B,D

 

質問 57
Refer to the following code:
Let obj ={
Foo: 1,
Bar: 2
}
Let output =[],
for(let something in obj{
output.push(something);
}
console.log(output);
What is the output line 11?

  • A. ["foo","bar"]
  • B. ["foo:1","bar:2"]
  • C. [1,2]
  • D. ["bar","foo"]

正解: A

 

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

  • A. 1.2.3
  • B. 1.1.4
  • C. 2.0.0
  • D. 1.2.0

正解: D

 

質問 59
Refer to the code below:
01 const exec = (item, delay) =>{
02 new Promise(resolve => setTimeout( () => resolve(item), delay)),
03 async function runParallel() {
04 Const (result1, result2, result3) = await Promise.all{
05 [exec ('x', '100') , exec('y', 500), exec('z', '100')]
06 );
07 return `parallel is done: $(result1) $(result2)$(result3)`;
08 }
}
}
Which two statements correctly execute the runParallel () function?
Choose 2 answers

  • A. runParallel ( ). done(function(data){
    return data;
    });
  • B. Async runParallel () .then(data);
  • C. runParallel () .then(data);
  • D. runParallel () .then(function(data)
    return data

正解: A,D

 

質問 60
A Developer wrote the following code to test a sum3 function that takes in an array of numbers and returns the sum of the first three number in the array, The test passes:
Let res = sum2([1, 2, 3 ]) ;
console.assert(res === 6 );
Res = sum3([ 1, 2, 3, 4]);
console.assert(res=== 6);
A different developer made changes to the behavior of sum3 to instead sum all of the numbers present in the array. The test passes:
Which two results occur when running the test on the updated sum3 function ?
Choose 2 answers

  • A. The line 02 assertion passes.
  • B. The line 05 assertion passes.
  • C. The line 02 assertion fails
  • D. The line 05 assertion fails.

正解: A,D

 

質問 61
......


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

トピック出題範囲
トピック 1
  • 型変換(明示的および暗黙的)
  • JSONの操作
  • データ型と変数
トピック 2
  • オブジェクトの作成、オブジェクトプロトタイプ、関数の定義
トピック 3
  • 非同期プログラミング
  • コールバック関数
  • PromisesとAsync
  • Await
トピック 4
  • Node.js、Node.jsライブラリでのサーバー側JavaScriptデバッグ

 

あなたをお手軽にCRT-600試験合格させるし100%試験合格保証:https://www.goshiken.com/Salesforce/CRT-600-mondaishu.html