JavaScript-Developer-I日本語 PDF問題集で2026年07月22日最近更新された問題 [Q24-Q40]

Share

JavaScript-Developer-I日本語 PDF問題集で2026年07月22日最近更新された問題

JavaScript-Developer-I日本語試験問題有効なJavaScript-Developer-I日本語問題集PDF

質問 # 24
どのステートメントが正常に解析されますか?

  • A. JSON.parse ("foo");
  • B. JSON. parse (""foo"');
  • C. JSON.parse ("foo");
  • D. JSON.parse (""foo'");

正解:B


質問 # 25
以下のコードを参照してください。
01 let timedFunction = () = > {
02 console.log( 'タイマーが呼び出されました。' );
03 };
04
05 let timerId = setInterval(timedFunction, 1000);
開発者がスケジュールされたタイマー関数をキャンセルできるのは、どのステートメントですか?

  • A. clearInterval(timerId);
  • B. removeInterval(timedFunction);
  • C. removeInterval(timerId);
  • D. clearInterval(timedFunction);

正解:A

解説:
The code:
let timerId = setInterval(timedFunction, 1000);
* setInterval schedules timedFunction to run every 1000 ms.
* It returns an interval ID (here stored in timerId), which is used to cancel the interval later.
To cancel:
* Use clearInterval(timerId);
This is the standard browser (and Node.js) API:
* let id = setInterval(fn, delay);
* clearInterval(id); stops future executions of that interval.
Check other options:
* B. removeInterval(timerId);
* There is no removeInterval function in the standard JavaScript timer API.
* C. removeInterval(timedFunction);
* Again, no such function; and timers are cancelled by ID, not by the callback function reference.
* D. clearInterval(timedFunction);
* clearInterval expects the ID returned by setInterval, not the callback function.
* Passing the function does not cancel the timer.
Therefore, the correct statement is:
The answer: A
Study Guide / Concept References (no links):
* Timer APIs: setInterval and clearInterval
* Relationship between timer ID and cancellation
* Difference between interval ID and callback function
* Basic async timing patterns in JavaScript


質問 # 26
Universal Container(UC)が新しいランディングページを立ち上げたばかりですが、ユーザーは
ウェブサイトが遅いです。開発者は、この問題を引き起こすいくつかの関数を見つけました。これを確認するには、
開発者は、これら3つの疑わしい機能のそれぞれについて、すべてを実行して時間を記録することにしました。
消費します。
console.time('パフォーマンス');
多分AHeavyFunction();
thisCouldTakeTooLong();
orMaybeThisOne();
console.endTime('パフォーマンス');
開発者は、3つすべてが費やした時間を取得するためにどの関数を使用できますか
関数?

  • A. console.trace()
  • B. console.getTime()
  • C. console.timeStamp()
  • D. console.timeLog()

正解:D


質問 # 27
開発者は次のコードを作成しました。
01 X = object.value;
02
03試してみてください{
04 handleObjectValue(X);
05} catch(エラー){
06 handleError(error);
07}
開発者には、handleObjectValue()の後に実行するgetNextValue関数がありますが、
エラーが発生した場合にgetNextValue()を実行したくない。
この動作を確実にするために、開発者はどのようにコードを変更できますか?

  • A. 03 try{
    04 handleObjectValue(x);
    05 } catch(error){
    06 handleError(error);
    07 }
    08 getNextValue();
  • B. 03 try{
    04 handleObjectValue(x);
    05 } catch(error){
    06 handleError(error);
    07 } finally {
    08 getNextValue();
    10 }
  • C. 03 try {
    04 handleObjectValue(x)
    05 ........................
  • D. 03 try{
    04 handleObjectValue(x);
    05 } catch(error){
    06 handleError(error);
    07 } then {
    08 getNextValue();
    09 }

正解:C


質問 # 28
以下のHTMLを前提としています。

ユニバーサルコンテナの行にpriority-accountCSSクラスを追加するステートメントはどれですか?

  • A. ドキュメント。queryselector('#row-uc')。ClassList.add('priority-account');
  • B. ドキュメント。getElementByid('row-uc')。addClass('priority-account *);
  • C. ドキュメント。querySelectorAll('#row-uc')-classList.add( "priority-accour');
  • D. ドキュメント。querySelector(#row-uc')。classes-push('priority-account');

正解:A


質問 # 29
開発者がJavaScriptオブジェクトをコピーしました。
01 function Person() {
02 this.firstName = " John " ;
03 this.lastName = " Doe " ;
04 this.name = () = > `${this.firstName},${this.lastName}`;
05 }
06
07 const john = new Person();
08 const dan = Object.assign({}, john);
09 dan.firstName = ' Dan ' ;
開発者はどのようにしてダンの名(firstName)と姓(lastName)にアクセスするのですか?

  • A. dan.name()
  • B. dan.firstName() + dan.lastName()
  • C. dan.name
  • D. dan.firstName + dan.lastName

正解:A

解説:
* Person instances have:
* firstName and lastName as string properties.
* A name method that returns a combined string: `${this.firstName},${this.lastName}`.
* Object.assign({}, john) creates a shallow copy of john into a new object, dan.
After:
dan.firstName = ' Dan ' ;
* dan.name() returns " Dan,Doe " .
Analysis of options:
* A: dan.firstName() and dan.lastName() are function calls , but firstName/lastName are strings, not functions # TypeError.
* B: Calls the defined method and uses both names correctly.
* C: dan.name is a function reference; you'd still need to call it: dan.name().
* D: dan.firstName + dan.lastName is " DanDoe " , no separator. It accesses the properties but not in the method the developer defined.
The intended way, using the provided API, is dan.name().


質問 # 30
以下のコードを参照してください。

05行目でエラーが発生します。
コードが完成した後の挨拶と敬礼の価値は何ですか?

  • A. あいさつはさようなら、礼拝はこんにちは、こんにちは。
  • B. あいさつはさようなら、敬礼はこんにちはと言います。
  • C. あいさつはこんにちは、敬礼はこんにちはと言います。
  • D. あいさつはこんにちは、礼拝はこんにちは、こんにちは。

正解:D


質問 # 31
開発者がインポートするもの:
import printPrice from ' /path/PricePrettyPrint.js ' ;
このインポートが機能するために、printPrice に関してどのような条件を満たす必要がありますか?

  • A. printPrice はマルチエクスポートである必要があります
  • B. printPrice はデフォルトのエクスポートである必要があります
  • C. printPrice はすべてのエクスポートである必要があります
  • D. printPrice は名前付きエクスポートである必要があります

正解:B

解説:
The syntax:
import printPrice from ' module ' ;
means the module must export its function as a default export :
export default function printPrice() { ... }
Why the others are wrong:
* Named exports require curly braces:
* import { printPrice } from ' module ' ;
* "all export" and "multi export" are not JavaScript terms.
Therefore, printPrice must be the default export .
JavaScript Knowledge References (text-only)
* Default imports use: import name from ' module ' .
* Named imports require braces: import { name } from ' module ' .


質問 # 32
開発者は、universalContainersLibという名前のモジュールを使用して、そこから関数を呼び出したいと考えています。
開発者はモジュールからすべての関数をインポートしてから、関数fooとbarをどのように呼び出す必要がありますか?

  • A. import * as lib from'/path/universalContainersLib.js';
    lib.foo();
    lib. bar ();
  • B. import {foo、bar} from'/path/universalCcontainersLib.js';
    foo():
    bar()?
  • C. '/path/universalContainersLib.js'からすべてをインポートします;
    UniversalContainersLib.foo();
    UniversalContainersLib.bar();
  • D. import * from'/path/universalContainersLib.js';
    UniversalContainersLib。foo()7
    UniversalContainersLib.bar();

正解:A


質問 # 33
以下のコードを参照してください(Promise.race を使用することを前提としています)。
let cat3 = new Promise(resolve = >
setTimeout(resolve, 3000, "Cat 3 完了")
);
Promise.race([cat1, cat2, cat3])
.then(value = > {
let result = `${value} レース結果。`;
})
.catch(err = > {
console.log("レースがキャンセルされました: ", err);
});
(cat1とcat2は以前の例と同様で、cat2が最も早く解決されると仮定します。)Promise.raceが実行されたとき、resultの値は何ですか?

  • A. 3号車はレースを完走しました。
  • B. レースは中止されました。
  • C. 2号車はレースを完走しました。
  • D. レース中に1号車がクラッシュしました。

正解:C

解説:
From earlier pattern (cars/cats race):
* One promise resolves the fastest with " Car 2 completed " (or analogous " Cat 2 completes " ).
* Promise.race resolves with the first settled promise's value.
* In .then, value is " Car 2 completed " and:
let result = `${value} the race.`;
// " Car 2 completed the race. "
Thus result is " Car 2 completed the race. " # option A.


質問 # 34
以下のコードを参照してください。

実行関数のPromiseが拒否された場合、結果はどうなりますか?

  • A. 拒否されました
  • B. 拒否されました 解決されました
  • C. 拒否1 拒否2 拒否3 拒否 拒否 拒否4
  • D. 解決済み 1 解決済み 2 解決済み 3 解決済み 4

正解:B


質問 # 35
開発者は、ボタン付きのシンプルなWebページを作成しています。ユーザーがこのボタンをクリックしたとき
初めてメッセージが表示されます。
開発者は以下のJavaScriptコードを作成しましたが、何かが足りません。The
メッセージは、初めてではなく、ユーザーがボタンをクリックするたびに表示されます。
01関数listen(event){
02アラート('Hey!I am John Doe');
03 button.addEventListener('クリック'、リッスン);
このコードを必要に応じて機能させる2つのコード行はどれですか?
2つの答えを選択してください

  • A. 行04で、event.stopPropagation()を使用します。
  • B. 行04で、button.removeEventListener('click "、listen);を使用します。
  • C. 行02で、event.firstを使用して、それが最初の実行であるかどうかをテストします。
  • D. 06行目で、button.addEventListener()に1回呼び出されるオプションを追加します。

正解:B、D


質問 # 36
以下のコードを参照してください。

JavaScriptがシングルスレッドであることを考えると、コードが実行された後の08行目の出力は何ですか?

  • A. 0
  • B. 1
  • C. 2
  • D. 3

正解:A


質問 # 37
localStorageからオブジェクトを正しく取得して返すコードステートメントはどれですか?

  • A. const retrieveFromLocalStorage =()=> {
    JSON.stringify(window.localStorage.getItem(storageKey));を返します。
    }
  • B. const retrieveFromLocalStorage =(storageKey)=> {
    window.localStorage.getItem(storageKey);を返します。
    }
  • C. const retrieveFromLocalStorage =(storageKey)=> {
    window.localStorage[storageKey]を返します。
    }
  • D. const retrieveFromLocalStorage =(storageKey)=> {
    JSON.parse(window.localStorage.getItem(storageKey));を返します。
    }

正解:D


質問 # 38
Universal Containersでは、すべてのチームがJavaScriptオブジェクトをコピーする独自の方法を持っています。コードスニペットは、1つのチームからの実装を示しています。

コード実行の出力は何ですか?

  • A. Hello John Doe
  • B. Hello Dan Doe
  • C. Hello Dan
  • D. SyntaxError: Unexpected token in JSON

正解:D


質問 # 39
開発者がチェックアウトボタンからHTMLクラス属性を削除したため、現在は単純に次のようになっています。
<ボタン>チェックアウト</ボタン>
チェックアウトボタンの存在を確認するテストがありますが、クラスが「blue」のボタンを探します。
該当するボタンが見つからないため、テストは失敗します。
このテストは、どのタイプのテストに分類されますか?

  • A. 真陽性
  • B. 偽陰性
  • C. 真の陰性
  • D. 偽陽性

正解:D

解説:
Definitions in testing context (treating "positive" as "test reports a bug/failure"):
* True positive : System has a bug; test correctly fails.
* False positive : System is correct; test fails (reports a bug that isn't actually a bug).
* True negative : System has a bug; test correctly passes indicating "no success" in detection context (less common phrasing here).
* False negative : System has a bug; test incorrectly passes (missed bug).
Here:
* The real requirement , as stated, is to verify the existence of the checkout button .
* The button still exists ( < button > Checkout < /button > ), so the system behavior is correct regarding that requirement.
* The test, however, is checking for an overly specific condition (class= " blue " ), which is not actually part of the stated requirement.
* The test fails , saying there is a problem (no button with class= " blue " ), even though from the requirement standpoint, the checkout button is present.
So:
* No real bug concerning presence of checkout button.
* Test reports a failure # a false positive .
Therefore, the correct category is D, False positive.


質問 # 40
......

JavaScript-Developer-I日本語問題集合格確定させる練習には149問があります:https://www.passtest.jp/Salesforce/JavaScript-Developer-I-JPN-shiken.html