wangdoc / typescript-tutorial

TypeScript 教程
https://wangdoc.com/typescript
2.49k stars 269 forks source link

描述错误 #81

Closed jinzesudawei closed 1 year ago

jinzesudawei commented 1 year ago

章节: https://wangdoc.com/typescript/types#boolean-%E7%B1%BB%E5%9E%8B 问题: 变量x和y就属于 boolean 类型。 修正: 常量x和y就属于 boolean 类型。

后面也有类似问题,如

章节: https://wangdoc.com/typescript/types#bigint-%E7%B1%BB%E5%9E%8B 问题: 上面示例中,变量x和y就属于 bigint 类型。 修正: 上面示例中,常量x和y就属于 bigint 类型。

jinzesudawei commented 1 year ago

看了下官方文档,conost 声明的是叫变量。 let and const are two relatively new concepts for variable declarations in JavaScript. https://www.typescriptlang.org/docs/handbook/variable-declarations.html