Salesforce Certified JavaScript Developer I Exam (JavaScript-Developer-I日本語版) - JavaScript-Developer-I日本語 Exam Practice Test
与えられたコード:
01 function GameConsole(name) {
02 this.name = name;
03 }
04
05 GameConsole.prototype.load = function(gamename) {
06 console.log( ' ${this.name} is loading a game: ${gamename}.... ' );
07 }
08
09 function Console16bit(name) {
10 GameConsole.call(this, name);
11 }
12
13 Console16bit.prototype = Object.create(GameConsole.prototype);
14
15 // insert code here
16 console.log( ' ${this.name} is loading a cartridge game: ${gamename}.... ' );
17 }
18
19 const console16bit = new Console16bit( ' SNEGeneziz ' );
20 console16bit.load( ' Super Monic 3x Force ' );
開発者は15行目に何を挿入すべきでしょうか?
01 function GameConsole(name) {
02 this.name = name;
03 }
04
05 GameConsole.prototype.load = function(gamename) {
06 console.log( ' ${this.name} is loading a game: ${gamename}.... ' );
07 }
08
09 function Console16bit(name) {
10 GameConsole.call(this, name);
11 }
12
13 Console16bit.prototype = Object.create(GameConsole.prototype);
14
15 // insert code here
16 console.log( ' ${this.name} is loading a cartridge game: ${gamename}.... ' );
17 }
18
19 const console16bit = new Console16bit( ' SNEGeneziz ' );
20 console16bit.load( ' Super Monic 3x Force ' );
開発者は15行目に何を挿入すべきでしょうか?
Correct Answer: A
Vote an answer
Explanation: Only visible for Fast2test members. You can sign-up / login (it's free).
開発者は、引数としてptsを1つ取るisDeg関数を持っています。この関数を1分ごとに実行するようにスケジュールしたいと考えています。
この関数をスケジュールするための正しい構文は何ですか?
この関数をスケジュールするための正しい構文は何ですか?
Correct Answer: D
Vote an answer
Explanation: Only visible for Fast2test members. You can sign-up / login (it's free).
以下のコードを参照してください。
< html lang= " en " >
< body >
< button class= " secondary " > Save draft < /button >
< button class= " primary " > Save and close < /button >
< /body >
< script >
function displaySaveMessage(event) {
console.log( ' Save message. ' );
}
function displaySuccessMessage(event) {
console.log( ' Success message. ' );
}
window.onload = function() {
document.querySelector( ' .secondary ' )
.addEventListener( ' click ' , displaySaveMessage, true);
document.querySelector( ' .primary ' )
.addEventListener( ' click ' , displaySuccessMessage, true);
}
< /script >
< /html >
< html lang= " en " >
< body >
< button class= " secondary " > Save draft < /button >
< button class= " primary " > Save and close < /button >
< /body >
< script >
function displaySaveMessage(event) {
console.log( ' Save message. ' );
}
function displaySuccessMessage(event) {
console.log( ' Success message. ' );
}
window.onload = function() {
document.querySelector( ' .secondary ' )
.addEventListener( ' click ' , displaySaveMessage, true);
document.querySelector( ' .primary ' )
.addEventListener( ' click ' , displaySuccessMessage, true);
}
< /script >
< /html >
Correct Answer: B
Vote an answer
Explanation: Only visible for Fast2test members. You can sign-up / login (it's free).
開発者は、try...catch 文を使用して countSheep() がスローする可能性のあるエラーをキャッチし、それを handleError() 関数に渡したいと考えています。
try...catch の正しい実装方法は何ですか?
try...catch の正しい実装方法は何ですか?
Correct Answer: C
Vote an answer
Explanation: Only visible for Fast2test members. You can sign-up / login (it's free).
以下のコードを参照してください。
let productSKU = ' 8675309 ' ;
開発者は、常に「sku」で始まり、ゼロで埋められた19文字の長さのSKU番号を生成する必要がある。
どの文が値 sku000000008675309 を割り当てますか?
let productSKU = ' 8675309 ' ;
開発者は、常に「sku」で始まり、ゼロで埋められた19文字の長さのSKU番号を生成する必要がある。
どの文が値 sku000000008675309 を割り当てますか?
Correct Answer: A
Vote an answer
Explanation: Only visible for Fast2test members. You can sign-up / login (it's free).
以下のコードが与えられた場合:
x = ( ' 15 ' + 10) * 2 とする。
xの値は何ですか?
x = ( ' 15 ' + 10) * 2 とする。
xの値は何ですか?
Correct Answer: A
Vote an answer
Explanation: Only visible for Fast2test members. You can sign-up / login (it's free).
開発者が、イベントとコールバックを使用して構築されたクライアントライブラリを備えた新しいNode.jsサーバーをセットアップしています。
図書館:
* WebSocket接続を確立し、サーバーへのメッセージの受信を処理します。
* require でインポートされ、ws という変数で使用できるようになります。
* 開発者は、接続が失敗した場合にエラーログを記録する機能も追加したいと考えています。
この情報に基づいて、実行時にリッスンする2つのイベントを持つクライアントを正しく設定する方法を示しているコードセグメントはどれですか?
図書館:
* WebSocket接続を確立し、サーバーへのメッセージの受信を処理します。
* require でインポートされ、ws という変数で使用できるようになります。
* 開発者は、接続が失敗した場合にエラーログを記録する機能も追加したいと考えています。
この情報に基づいて、実行時にリッスンする2つのイベントを持つクライアントを正しく設定する方法を示しているコードセグメントはどれですか?
Correct Answer: A
Vote an answer
Explanation: Only visible for Fast2test members. You can sign-up / login (it's free).
以下のコードを参照してください。
01 let obj = {
02 foo: 1,
03 bar: 2
04 }
05 let output = []
06
07 for (let something of obj) {
08 output.push(something);
09 }
10
11 console.log(output);
11行目の出力値は何ですか?
01 let obj = {
02 foo: 1,
03 bar: 2
04 }
05 let output = []
06
07 for (let something of obj) {
08 output.push(something);
09 }
10
11 console.log(output);
11行目の出力値は何ですか?
Correct Answer: C
Vote an answer
Explanation: Only visible for Fast2test members. You can sign-up / login (it's free).
開発者はNode.jsを使って安全なWebサーバーを構築したいと考えています。開発者はローカルにapp-serverというディレクトリを作成し、最初のファイルはapp-server/index.jsです。
サードパーティライブラリを一切使用せずに、開発者は安全なWebサーバーを作成するためにindex.jsに何を追加すべきでしょうか?
サードパーティライブラリを一切使用せずに、開発者は安全なWebサーバーを作成するためにindex.jsに何を追加すべきでしょうか?
Correct Answer: A
Vote an answer
Explanation: Only visible for Fast2test members. You can sign-up / login (it's free).
コードを参照してください。
01 function execute() {
02 return new Promise((resolve, reject) => reject());
03 }
04 let promise = execute();
05
06 promise
07 .then(() = > console.log( ' Resolved1 ' ))
08 .then(() = > console.log( ' Resolved2 ' ))
09 .then(() = > console.log( ' Resolved3 ' ))
10 .catch(() => console.log('拒否されました'))
11 .then(() = > console.log( ' Resolved4 ' ));
execute関数内のPromiseが拒否された場合、どのような結果になりますか?
01 function execute() {
02 return new Promise((resolve, reject) => reject());
03 }
04 let promise = execute();
05
06 promise
07 .then(() = > console.log( ' Resolved1 ' ))
08 .then(() = > console.log( ' Resolved2 ' ))
09 .then(() = > console.log( ' Resolved3 ' ))
10 .catch(() => console.log('拒否されました'))
11 .then(() = > console.log( ' Resolved4 ' ));
execute関数内のPromiseが拒否された場合、どのような結果になりますか?
Correct Answer: D
Vote an answer
Explanation: Only visible for Fast2test members. You can sign-up / login (it's free).