
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Represent Source Code of an Object with JavaScript Arrays
JavaScript array toSource() method returns a string representing the source code of the array. This method is supported by Mozilla.
Example
You can try to run the following code to learn how to represent the source code of an object with JavaScript Arrays −
<html> <head> <title>JavaScript Array toSource Method</title> </head> <body> <script> var arr = new Array("football", "baseball", "volleyball", "cricket"); var str = arr.toSource(); document.write("Returned string is : " + str ); </script> </body> </html>
Advertisements