Fast2test JavaScript-Developer-I問題集でリアル試験問題でテストエンジン問題集でトレーニング [Q51-Q66]

Share

Fast2test JavaScript-Developer-I問題集でリアル試験問題でテストエンジン問題集でトレーニング

Salesforce JavaScript-Developer-Iテスト問題集とオンライン試験エンジン

質問 # 51
A developer wrote a fizzbuzz function that when 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.
Which two test cases will properly test scenarios for the fizzbuzz function?
Choose 2 answers

  • A. let res = fizzbuzz(Infinity);
    console.assert ( res === ' ' )
  • B. let res = fizzbuzz(5);
    console.assert ( res === ' ' );
  • C. let res = fizzbuzz(15);
    console.assert ( res === ' fizzbuzz ' )
  • D. let res = fizzbuzz(3);
    console.assert ( res === ' buzz ' )

正解:A、C、D


質問 # 52
Which three statements are true about promises ?
Choose 3 answers

  • A. A pending promise can become fulfilled, settled, or rejected.
  • B. A settled promise can become resolved.
  • C. A fulfilled or rejected promise will not change states .
  • D. The executor of a new Promise runs automatically.
  • E. A Promise has a .then() method.

正解:A、C、E


質問 # 53
Refer to the string below.
Const str='Salesforce';
Which two statements results in the word 'Sales'?

正解:

解説:
See the Answer below in explanation:
Explanation
Str.substring(0,5);
Str.substr(0,5);


質問 # 54
Refer to the code below:
01 const server = require('server');
02 /* Insert code here */
A developer imports a library that creates a web server. The imported library uses events and
callbacks to start the servers
Which code should be inserted at the line 03 to set up an event and start the web server ?

  • A. serve(( port) => (
  • B. server()
  • C. console.log( 'Listening on ', port) ;
  • D. Server.start ();
  • E. server.on(' connect ' , ( port) => {
    console.log('Listening on ' , port) ;})

正解:E


質問 # 55
Refer to the code below:

A developer needs to dispatch a custom event called update to send information about recordId.
Which two options could a developer insert at the placeholder in line 02 to achieve this? Choose 2 answers

  • A. 'update', ( recordId ; 123abc'
    )
  • B. 'update' , '123abc'
  • C. {type ; update ', recordId : '123abc')
  • D. 'update', {
    Detail ; {
    recordId, '123abc
    )
    )

正解:A、D


質問 # 56
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/PrincePrettyPrint. Js';
Based on the code, what must be true about the printPrice function of the PricePrettyPrint modules for this import to work?

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

正解:B


質問 # 57
A developer has a formatName function that takes two arguments, firstName and lastName and returns a string. They want to schedule the function to run once after five seconds.
What is the correct syntax to schedule this function?

  • A. setTimeout (formatName(), 5000, "John", "BDoe");
  • B. setTimeout (formatName('John', ''Doe'), 5000);
  • C. setTimout(() => { formatName("John', 'Doe') }, 5000);
  • D. setTimeout ('formatName', 5000, 'John", "Doe');

正解:D


質問 # 58
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 05 assertion fails.
  • B. The line 05 assertion passes.
  • C. The line 02 assertion passes.
  • D. The line 02 assertion fails

正解:A、C


質問 # 59
Refer to the following code that imports a module named Utills,
Which two implementations of Utill, je export foo and bar such that the code above runs without error?
Choose 2 answers

  • A. Const foo = ( ) => ( return 'foo; ; )
    Const bar => => { return 'bar ';}
    Export default foo, bar;
  • B. Export default class (
    Foo ( ) ( return 'foo ,; )
    Bar ( ) ( return ;bar ; )
  • C. Const foo = () => ( return 'foo ' ; )
    Const bar => ( return 'bar' ; )
    Export (foo, bar)
  • D. //FooUtill.js and barUtils, js exist
    Import (foo) from ,/Path/footUtils.js,:
    Export (foo, bar)

正解:B


質問 # 60
Refer to the code below:

A developer uses a client that makes a GET request that uses a promise to handle the request, getRequest returns a promise.
Which code modification can the developer make to gracefully handle an error?
A)

B)

C)

D)

  • A. Option C
  • B. Option A
  • C. Option D
  • D. Option B

正解:B


質問 # 61
A developer wants to create an object from a function in the browser using the code below.

What happens due to the lack of the mm keyword on line 02?

  • A. The m variable is assigned the correct object.
  • B. window.name is assigned to 'hello' and the variable = remains undefined.
  • C. window.m Is assigned the correct object.
  • D. The m variable is assigned the correct object but this.name remains undefined.

正解:B


質問 # 62
There is a new requirement for a developer to implement a currPrice method that will return the current price of the item or sales..

What is the output when executing the code above

  • A. 50
    Uncaught TypeError: saleItem,desrcription is not a function
    50
    80
  • B. 50
    80
    Uncaught Reference Error:this,discount is undefined
    72
  • C. 50
    80
    72
  • D. 50
    80
    50
    72

正解:D


質問 # 63
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.lock()
  • C. Object.freeze()
  • D. Object.eval()

正解:C


質問 # 64
Given the HTML below:

Which statement adds the priority-account CSS class to the Unversal Containers row?

  • A. Document. querySelectorAll ( '# row-uc ') .classList. add ('priority-account');
  • B. Document. queryselector ('# row-uc') ,classes. Push (' priority-account');
  • C. Document. querySelector ( 'row-uc') . classList. Add ( 'pariority-account') ;
  • D. Document. getElementById ( 'row-uc') addClass ( ' priority-account');

正解:C


質問 # 65
A developer has an ErrorHandler module that contains multiple functions.
What kind of export should be leveraged so that multiple functions can be used?

  • A. named
  • B. all
  • C. default
  • D. multi

正解:A


質問 # 66
......

Salesforce JavaScript-Developer-I問題を提供していますSalesforce Developer問題集と完璧な解答付き:https://jp.fast2test.com/JavaScript-Developer-I-premium-file.html

信頼され続けるJavaScript-Developer-I試験のコツとPDF試験材料:https://drive.google.com/open?id=1tbuNCm9d7Ck_vxO7Uhdx7Bld996rQO2n


弊社を連絡する

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

我々の働いている時間: ( GMT 0:00-15:00 )
月曜日から土曜日まで

サポート: 現在連絡 

English Deutsch 繁体中文 한국어