Loading...
Loading...
Compare original and translation side by side
// Bad - the code already says this
i += 1; // increment i
user.save(); // save the user
// Good - explains WHY, not WHAT
i += 1; // compensate for zero-indexing in display// 不良示例 - 代码本身已经表达了这个意思
i += 1; // increment i
user.save(); // save the user
// 良好示例 - 解释原因,而非内容
i += 1; // compensate for zero-indexing in display// DELETE THIS - it's an abomination
// function oldCalculateTax(income: number): number {
// return income * 0.15;
// }// DELETE THIS - it's an abomination
// function oldCalculateTax(income: number): number {
// return income * 0.15;
// }