undefined 。如果对undefined变量进行数学运算,则结果将为NaN ,表示“非数字” 。如果将字符串与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并且值应为“我是一个字符串!”
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");'
```