Why is 4 not an instance of Number?

前端 未结 5 1461
生来不讨喜
生来不讨喜 2020-11-27 03:03

Just curious:

  • 4 instanceof Number => false
  • new Number(4) instanceof Number => true?

Why is this? Same with strings:

5条回答
提交回复
热议问题