jQuery in Action, 2nd edition*
The moose likes HTML, CSS and JavaScript and the fly likes JavaScript code question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "JavaScript code question" Watch "JavaScript code question" New topic
Author

JavaScript code question

Arjun Reddy
Ranch Hand

Joined: Nov 10, 2007
Posts: 627
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: 60789
    
  65

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.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Arjun Reddy
Ranch Hand

Joined: Nov 10, 2007
Posts: 627
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: 60789
    
  65

Please do not consider it any sort of valid programming style!

Eeeesh!
Arjun Reddy
Ranch Hand

Joined: Nov 10, 2007
Posts: 627
ok
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JavaScript code question
 
Similar Threads
while-loop
output of this code
pulling data from xml using javascript
Updated MulitThreads Problem
Javascript API