QuestenaPractice that shows what to review next
Question 25

Which description best matches a JavaScript string primitive?

  1. An immutable sequence of UTF-16 code unitsCorrect answer
  2. A mutable array of visible characters
  3. A sequence with one byte per character
  4. An object whose elements can be reassigned

Explanation

A JavaScript string is an immutable sequence of UTF-16 code units. Saying it is a sequence of visible characters is too strong because some displayed characters require multiple code units or multiple code points.

Continue with this test

Start practice
Question 25: Which description best matches a JavaScript string… · JavaScript Fundamentals · Questena