OZONE Asylum
Forums
DHTML/Javascript
How to access a range within a mulidimensional array
This page's ID:
31520
Search
QuickChanges
Forums
FAQ
Archives
Register
Edit Post
Who can edit a post?
The poster and administrators may edit a post. The poster can only edit it for a short while after the initial post.
Your User Name:
Your Password:
Login Options:
Remember Me On This Computer
Your Text:
Insert Slimies »
Insert UBB Code »
Close
Last Tag
|
All Tags
UBB Help
My javascript array has values for "chapter", "paragraph", "sentence", and the text of this sentence. It looks like this: book = [ [1, 1, 1, "Hi Mary."], [1, 1, 2, "Today's Tuesday"], [1, 1, 3, "We came back from fishing."], ... ... [4, 26, 9, "We then took a nap."], [4, 26, 10, "That was Tuesday"], [4, 27, 1, "On Wednesday it was raining."], ... ... [8, 84, 6, "Then he waved goodbye."] ]; I need to sequentially process chapters at a time. E.g., to calculate average wordcount per paragraph in chapter 4. How do I point into this array? What's the best way for me to start sequential processing within this array? The only parameters I get are the 1st and last chapter numbers, i.e., the first element in the first and last entries (inclusive) of the range. E.g. How would I process from [4, , , ] through [6, , , ]?
Loading...
Options:
Enable Slimies
Enable Linkwords
« Backwards
—
Onwards »