aspose file tools*
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
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: 629
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: 61657
    
  67

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: 629
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: 61657
    
  67

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

Eeeesh!
Arjun Reddy
Ranch Hand

Joined: Nov 10, 2007
Posts: 629
ok
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JavaScript code question