フリー問題

Salesforce Certified JavaScript Developer のフリー問題 5 / 20 問目

問題文

A utility must branch when its argument is an array rather than a plain object. Which check identifies an array correctly?

選択肢

  1. Array.isArray(value), which returns true only for arrays and works across execution contexts.
  2. value.length !== undefined, which is true for every array and false for other values.
  3. value instanceof Object, which is true for arrays and false for plain objects created with the object literal syntax.
  4. typeof value === 'array', which distinguishes arrays from objects, and the specification defines a dedicated result string for the array type.

解答・解説を確認するには

正解と解説の確認、回答の記録には無料登録が必要です。登録すると演習モードでフリー問題に回答し、正誤と解説をその場で確認できます。