<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
<script>
let a = 0;
console.log(typeof(a));
a = !a; //a的相反数
console.log(a);//true
a = !a; //a的相反数的相反数,等于自己的本身
console.log(a
布尔类型的转换
最新推荐文章于 2024-06-26 19:02:48 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)