Combing an Array Elements into Strinds



Write a JavaScript code to combine array elements into string without separator.

<html>
  <head>
    <title>Array Demo</title>
      <script>

        var a =new Array();
        
        a[0]="C";
        a[1]="C++";
        a[2]="Java";

        var r =a.join();
        document.write("After joining =" +r);

      </script>
    </head>
  <body>       
</body>
</html>

Output:

After joining =C,C++,Java