静态类型
以ts为例,如果有语法类型错误,会在编译时就报错
let bool: boolean = true
console.log(bool.split());
![在这里插入图片描述](https://i-blog.csdnimg.cn/blog_migrate/ef6446acce56e2c5d80bf7464ef60dd2.png#pic_center)
动态类型
以js为例,没有编译阶段,如果有语法类型错误,会在运行时报错影响线上
------------------------------------------------------------------------------------------------------------------
判断机制 按照类型检查的时机