tepyof typeof a为什么返回是string类型

tepyof typeof a为什么返回是string类型 搞不清楚了。tepyof typeof a为什么返回是string类型

从右边往左边计算 ,typeof a的返回值 给左边的typeof 当做参数 去运行了
a未定义 undefined
a 此时的值: string ------"undefined"
typeof a 就等同于 typeof "undefined" 返回字符串类型 的" string"

typeof(a)——返回字符串“undefined”
typeof("undefined")返回String;

因此tepyof typeof a返回的是string类型。

希望对题主有所帮助,可以的话,帮忙点个采纳!

您好,我是有问必答小助手,您的问题已经有小伙伴帮您解答,感谢您对有问必答的支持与关注!
PS:问答VIP年卡 【限时加赠:IT技术图书免费领】,了解详情>>> https://vip.csdn.net/askvip?utm_source=1146287632