JavaScript tostring() Function Example

JavaScript tostring() function convert array to a string.

Example

<html>
<head>
    <title>JavaScript toString function</title>
</head>
<body>
    <script type="text/javascript">
        var country = ["India", "Canada", "Egypt", "England"];
        document.write(country.toString());
    </script>
</body>
</html>

Run it...   »

Example Result