JavaScript Objects The Boolean Object- toSource() - Javascript Objects

What is JavaScript - Boolean toSource() Method?

JavaScript boolean toSource() method returns a string representing the source code of the object.

Note− It is not compatible with all the browsers.

Syntax:

Its syntax is shown below −

Return Value:

It returns a string representing the source code of the object.

Example:

Try the below example.

Output:

({title:"Perl", publisher:"Leo Inc", price:200})


All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

Javascript Objects Topics