提交 bf6f9dc2 编写于 作者: 杜庆泉's avatar 杜庆泉

Update README.md

上级 65b05fd4
......@@ -168,6 +168,9 @@ let a1:Array<number> = [1,2,3,4]
目前建议开发者,除了boolean和string外,其他包括数字和数组在内的类型,尽量不使用字面量自动类型推导,而是显式声明类型。避免 uts 统一自动类型推导时引发的向下兼容问题。
### 类型判断
>> 需要注意:isArray 需要HX 3.9.0之后版本才会支持
判断类型,有好几种方案:typeof、instanceof、isArray。
使用 typeof 可以判断布尔值、数字、字符串、函数。
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册