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

Which declaration is invalid specifically because a const binding lacks an initializer?

  1. let total
  2. const totalՃիշտ պատասխան
  3. let total = 0
  4. const total = 0

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

A const declaration must establish its value as part of the declaration, so writing const total without an initializer is invalid. A let declaration may omit its initializer, making the claim that both forms have the same requirement incorrect.

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

Սկսել վարժանքը
Հարց 90: Which declaration is invalid specifically because a const… · JavaScript Fundamentals · Questena