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

Classify the statements about JavaScript loose equality. Select all that apply.

  1. It may convert differently typed operandsՃիշտ պատասխան
  2. It always converts both operands to strings
  3. It does not always convert both operands to stringsՃիշտ պատասխան
  4. It always converts both operands to numbers

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

Loose equality may convert operands of different types before comparing them, but its rules do not reduce to always making both strings or always making both numbers. Same-type operands can also be compared without a type conversion, so conversion is possible rather than universal.

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

Սկսել վարժանքը
Հարց 16: Classify the statements about JavaScript loose equality.… · JavaScript Fundamentals · Questena