Thread: book code
View Single Post
  #3 (permalink)  
Old June 28th, 2004, 04:41 PM
Imar's Avatar
Imar Imar is offline
Wrox Author
Points: 72,073, Level: 100
Points: 72,073, Level: 100 Points: 72,073, Level: 100 Points: 72,073, Level: 100
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

No no no, lastIndexOf does exist as well. lastIndexOf returns, unsurprisingly, the last index of a string occurence. It works pretty much the same as indexOf, but it starts searching at the end.

Search Google for lastIndexOf JavaScript to see what I mean....

Can you tell us where you get the error? That is, tell us the page and the line number. Makes it easier to spot any error....

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
While typing this post, I was listening to: Thieves Like Us by New Order (Track 6 from the album: Substance - Disc 1) What's This?
Reply With Quote