JavaScript Tutorial/Array/String Indexer — различия между версиями

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

Текущая версия на 11:25, 26 мая 2010

Array String Indexes

It is possible to index arrays using strings.

To access an element, a string index value is placed into the [] operator.



   <source lang="javascript">

<HTML> <SCRIPT LANGUAGE="JavaScript">

</SCRIPT> </HTML></source>


Use string as the array indexer

   <source lang="javascript">

<html> <head> <title>Mixing Notations</title> <script language="javascript" type="text/javascript">

</script> </head> <body>

Mixing Notations

</body> </html></source>