JavaScript Tutorial/Array/valueOf

Материал из Web эксперт
Перейти к: навигация, поиск

Array.valueOf()

The valueOf() method returns the primitive value of the object.

This method returns the array elements separated by commas.

If an array contains another array, the contents are flattened when this method is used.



   <source lang="javascript">

<html>

   <script language="JavaScript">
   
   </script>

</html></source>


Use array.valueOf with a two dimensional array

   <source lang="javascript">

<html>

   <script language="JavaScript">
   
   </script>

</html></source>