//1.检测获取字符串的长度 变量.length
num.length
//2.检测变量的数据类型 typeof 变量
typeof numnum.length
//3.把其他型转换为字符串型
//3.1.变量.toString()
num.toString()
//3.2.String(变量)
String(num)
//3.3..利用 + 拼接字符串的方法实现转换效果 隐式转换
num+''
//4.把字符型转换为数字型
//4.1.parseInt(变量).(得到的是整数,取整,可去掉单位)
parseInt(age)
//4.2.parseFloat(变量).(能得到浮点数,可去掉单位)
parseFloat(age)
//4.3.Number(变量).()
Number(age)
//4.4.算数运算转换(-.*./)(不包括'+').隐式转换
('12'-'10')
//5.把其他类型转换为布尔型
//Boolean(变量)