Being fairly new to JavaScript, I\'m unable to discern when to use each of these.
Can anyone help clarify this for me?
IndexOf() - it accepts string literals or string objects but not regular expressions. It also accepts a zero-based integer value to start its search from, e.g.:
Search() - accepts both string literals or string objects and regular expressions. But it doesn't accepts a index to start the search from.