Skip to content
String학습 기록

The difference between String() and toString()

1 min readLearningMoved from my Tistory blogRead the Korean original

While taking a course, I wondered about the difference between string() and toString(), so I looked it up.

From what I found, there's no difference between the two when you only use them to convert the type.

But String() outputs undefined or null as text when you pass them in.

toString(), on the other hand, gives you a TypeError.

  • #String()
  • #ToString()

More in Learning