美文网首页
String() vs new String()

String() vs new String()

作者: Time_Notes | 来源:发表于2020-06-06 18:03 被阅读0次

"str" 和 String("str") //基本类型 typeof ... string

new String("str") //引用类型 typeof ... object,存的是new String()实例的一个地址,可以定义成员属性

相关文章

网友评论

      本文标题:String() vs new String()

      本文链接:https://www.haomeiwen.com/subject/gceiuhtx.html