测试数据类型typeof的用法 var number = 6; var string = "wanli"; console.log(typeof number); console.log(typeof string);