undefined
。当你对一个值为undefined
的变量进行运算操作的时候,算出来的结果将会是NaN
,NaN
的意思是"Not a Number"。当你用一个值是undefined
的变量来做字符串拼接操作的时候,它会输出字符串"undefined"
。
a
、b
、c
,并且分别给他们赋值:5
、10
、"I am a"
,这样它们值就不会是undefined
了。
a
应该被定义,并且值为6
。
testString: assert(typeof a === 'number' && a === 6);
- text: b
应该被定义,并且值为15
。
testString: assert(typeof b === 'number' && b === 15);
- text: c
的值不能包含undefined
,应该为 "I am a String!"。
testString: assert(!/undefined/.test(c) && c === "I am a String!");
- text: 不要修改第二条注释下的代码。
testString: assert(/a = a \+ 1;/.test(code) && /b = b \+ 5;/.test(code) && /c = c \+ " String!";/.test(code));
```