可以直接使用VS打开直接运行,查看效果 1、typeof - 返回值有六种可能:"number," "string," "boolean," "object," "function," 和 "undefined." 2、所以,typeof函数不仅可以判断某一个变量的类型,还是可以判断一个变量是否存在