undefined
. Если вы выполняете математическую операцию с undefined
переменной, ваш результат будет NaN
что означает «Not a Number» . Если вы конкатенируете строку с undefined
переменной, вы получите буквенную строку "undefined"
. a
, b
и c
с 5
, 10
и "I am a"
соответственно, чтобы они не были undefined
. a
следует определить и оценить, чтобы иметь значение 6
'
testString: 'assert(typeof a === "number" && a === 6, "a
should be defined and evaluated to have the value of 6
");'
- text: 'b
следует определить и оценить, чтобы иметь значение 15
'
testString: 'assert(typeof b === "number" && b === 15, "b
should be defined and evaluated to have the value of 15
");'
- text: c
не должен содержать undefined
и должен иметь значение «Я - String!».
testString: 'assert(!/undefined/.test(c) && c === "I am a String!", "c
should not contain undefined
and should have a value of "I am a String!"");'
- text: Не меняйте код под строкой
testString: 'assert(/a = a \+ 1;/.test(code) && /b = b \+ 5;/.test(code) && /c = c \+ " String!";/.test(code), "Do not change code below the line");'
```