Please note, this is a STATIC archive of website www.tutorialspoint.com from 11 May 2019, cach3.com does not collect or store any user information, there is no "phishing" involved.
Tutorialspoint

1 Answer
karthikeya Boyini

The join() function of the TypedArray object joins the contents of the typed array as single string and returns it. To this method you can pass a separator to separates the elements of the array.

Syntax

Its Syntax is as follows

typedArray.join(':')

Example

Live Demo

<html>
   <head>
      <title>JavaScript Array every Method</title>
   </head>
   <body>
      <script type="text/javascript">
         var int32View = new Int32Array([21, 19, 65, 21, 14, 66, 87, 55 ]);
         document.write("<br>");
         var contains = int32View.join('');
         document.write("."+contains);
         document.write("<br>");
         document.write(int32View.join(':'));
         document.write("<br>");
         document.write(int32View.join('-'));
         document.write("<br>");
         document.write(int32View.join(' '));
      </script>
   </body>
</html>

Output

:
2119652114668755
21:19:65:21:14:66:87:55
21-19-65-21-14-66-87-55
21 19 65 21 14 66 87 55

Advertisements

We use cookies to provide and improve our services. By using our site, you consent to our Cookies Policy.