I'm looking for javascript in particular but I guess the problem is the same in any language. The indexOf function allows us to specify what we are looking for and where to start. It then searches down the string from the start position. Is there a way to search up the string?

IE in pseudo code:

```
str = "Hello this is a string, this is how I would like to search this string."

str.indexOf(lookFor = "this", startPosition = indexOf(how), lookUp = true)

```

In this case the function should return the "this" that is **just before "how"**. It's not the one at the start of the string, or it's not the one after "how".