QuestenaՎարժանք, որը ցույց է տալիս՝ ինչ կրկնել հաջորդիվ
Հարց 30

Given word = "cat", what does word[9] return?

  1. undefinedՃիշտ պատասխան
  2. an empty string
  3. the final character
  4. RangeError

Բացատրություն

Bracket indexing beyond the available code-unit positions returns undefined. An empty string is the result associated with out-of-range charAt, so transferring that behavior to brackets selects the closest but incorrect alternative.

Շարունակեք այս թեստով

Սկսել վարժանքը
Հարց 30: Given word = "cat", what does word[9] return? · JavaScript Fundamentals · Questena