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

Compare the string "5" with the number 5. Which pair of equality results is correct?

  1. Loose is true; strict is falseՃիշտ պատասխան
  2. Loose is false; strict is true
  3. Both comparisons are true
  4. Both comparisons are false

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

Loose equality converts for this mixed string-and-number comparison, so the loose comparison is true. Strict equality performs no such conversion, making its result false because the operand types differ.

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

Սկսել վարժանքը
Հարց 18: Compare the string "5" with the number 5. Which pair of… · JavaScript Fundamentals · Questena