diff --git a/docs/frontend-knowledge/typescript/basic-types.md b/docs/frontend-knowledge/typescript/basic-types.md index e4c6784..246b111 100644 --- a/docs/frontend-knowledge/typescript/basic-types.md +++ b/docs/frontend-knowledge/typescript/basic-types.md @@ -84,7 +84,7 @@ const arr2: Array = []; ### 元组 -在某些情况下,使用元组(Tuple)来代替数组要更加妥当,比如一个数组中只存放固定长度的变量,但我们进行了超出长度的访问。如果是数组,会抛出错误;使用元素的话,能在越界访问时给出类型报错: +在某些情况下,使用元组(Tuple)来代替数组要更加妥当,比如一个数组中只存放固定长度的变量,但我们进行了超出长度的访问。如果是数组,会抛出错误;使用元组的话,能在越界访问时给出类型报错: ```typescript // 使用数组,运行时报错