console.log()
和typeof
方法是检查中间值和程序输出类型的两种主要方法。现在是时候进入错误所采用的常见形式了。快速打字机可以同意的一个语法级问题是简单的拼写错误。变量或函数名称中的转置,丢失或错误大写字符将使浏览器查找不存在的对象 - 并以引用错误的形式进行抱怨。 JavaScript变量和函数名称区分大小写。 netWorkingCapital
计算有效。 receivables
在代码中声明并正确使用应receivables
变量。
testString: 'assert(code.match(/receivables/g).length == 2, "The receivables
variable should be declared and used properly in the code.");'
- text: 代码中不应存在拼写错误的变量。
testString: 'assert(!code.match(/payable;/g), "There should be no instances of mis-spelled variables in the code.");'
- text: 应在组织中声明并正确使用payables
变量。
testString: 'assert(code.match(/payables/g).length == 2, "The payables
variable should be declared and used properly in the code.");'
```