File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes HTML, CSS and JavaScript and the fly likes JavaScript code question Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Reply Bookmark "JavaScript code question" Watch "JavaScript code question" New topic
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
    
  13

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
    
  13

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

Eeeesh!
Arjun Reddy
Ranch Hand

Joined: Nov 10, 2007
Posts: 622
ok
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: JavaScript code question
 
Similar Threads
pulling data from xml using javascript
while-loop
Javascript API
output of this code
Updated MulitThreads Problem