Find your content:

Search form

You are here

Difference between String() vs toString in javascript

 
Share

For toString() a value has to exist. With String(), you can use it on values that are undefined or null. Attempting a toString() from an undefined or null value will produce an error. String will often call an object's toString() anyway, so its a safer way of doing that.

My Block Status

My Block Content