name会在没有得到新的值的时候,默认使用值 "Anonymous"。你还可以给多个参数赋予默认值。
increment加上默认参数,使得在value没有被赋值的时候,默认给number加1。
increment(5, 2)的结果应该为7。
testString: assert(increment(5, 2) === 7);
- text: increment(5)的结果应该为6。
testString: assert(increment(5) === 6);
- text: 参数value的默认值应该为1。
testString: assert(code.match(/value\s*=\s*1/g));
```