Start networking and exchanging professional insights

Register now or log in to join your professional community.

Follow

What is the usage of method toString() in javascript?

user-image
Question added by mohamed ahmed mahmoud , مصمم مواقع انترنت web designer , conect
Date Posted: 2017/03/15
Sameer Khan
by Sameer Khan , Software And Web Developer , Hocrox infotech

toString() method returns a boolean value as a string. Note: This method is called by JavaScript automatically whenever a boolean is used in a string operation.

var bool = true;

var x = bool.toString();

Syed Hussain Moosa
by Syed Hussain Moosa , Senior Software Engineer , Emirates Airlines

toString() is a function used to convert any value/object into string.

medhatmahmoud mahmoud
by medhatmahmoud mahmoud , Web Designer , Connect Computer Service Co

method toString() converts an array to a string of (comma separated) array values

More Questions Like This

Do you need help in adding the right keywords to your CV? Let our CV writing experts help you.