可以使用constructor 属性来判断数据是什么类型 "John".constructor // 返回函数 String() 转载于:https://www.cnblogs.com/ielse/p/9389473.html