In JS, why i am able to use functions like tofixed() which resides in prototype of Number wrapper object on a primitive type?

后端 未结 0 531
醉酒成梦
醉酒成梦 2020-12-25 12:50

In jS, primitve types (number, string etc) are not ojects. so they dont have [[prototype]] so cant use methdods available in [[prototype]] of some Objects. whereas Number ,S

相关标签:
回答
  • 消灭零回复
提交回复
热议问题