diff --git a/guide/chinese/javascript/falsy-values/index.md b/guide/chinese/javascript/falsy-values/index.md index dce37bfe43..cba89adf61 100644 --- a/guide/chinese/javascript/falsy-values/index.md +++ b/guide/chinese/javascript/falsy-values/index.md @@ -19,17 +19,17 @@ if (!variable) { ## 一般例子 ```javascript -var string = ""; // <-- falsy - - var filledString = "some string in here"; // <-- truthy - - var zero = 0; // <-- falsy - - var numberGreaterThanZero // <-- truthy - - var emptyArray = []; // <-- truthy, we'll explore more about this next - - var emptyObject = {}; // <-- truthy +const string = ""; // <-- falsy + +const filledString = "some string in here"; // <-- truthy + +const zero = 0; // <-- falsy + +let numberGreaterThanZero; // <-- falsy + +const emptyArray = []; // <-- truthy, we'll explore more about this next + +const emptyObject = {}; // <-- truthy ``` ## 有阵列的乐趣 @@ -71,4 +71,4 @@ const match = { teamA: 0, teamB: 1 } * [Falsy |词汇表| MDN](https://developer.mozilla.org/en-US/docs/Glossary/Falsy) -* [Truthy和Falsy:当JavaScript中的所有不相等时](https://www.sitepoint.com/javascript-truthy-falsy/) \ No newline at end of file +* [Truthy和Falsy:当JavaScript中的所有不相等时](https://www.sitepoint.com/javascript-truthy-falsy/)