| Author |
JavaScript code question
|
Arjun Reddy
Ranch Hand
Joined: Nov 10, 2007
Posts: 622
|
|
Hi All,
I am unable to understand myArray[4] and line no 8 from the below code. Can someone explain me what it means?
Thanks.
|
Be Humble... Be Nice.
|
 |
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56200
|
|
I hope this is just academic code and not something that's actually being used for anything!
In any case, [4] is a regular expression, which possesses a test() method which is being called.
|
[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
|
 |
Arjun Reddy
Ranch Hand
Joined: Nov 10, 2007
Posts: 622
|
|
I found it on this page actually.
http://www.hunlock.com/blogs/Mastering_Javascript_Arrays
|
 |
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56200
|
|
Please do not consider it any sort of valid programming style!
Eeeesh!
|
 |
Arjun Reddy
Ranch Hand
Joined: Nov 10, 2007
Posts: 622
|
|
ok
|
 |
 |
|
|
subject: JavaScript code question
|
|
|