title: Javascript function that takes a paragraph as an argument and returns an array of names
body: <p>I'm writing a function whose sole purpose is to take one paragraph as an argument.Then take all of the text that comes after a colon and split it at each comma. </p>
  
  <p>Here is the function I came up with but the console is giving me a "Exception: TypeError: undefined is not a function"</p>
  
  <p>here is the code in question:</p>
  
  <pre><code>function catNames (paragraph){
    return paragraph.indexof(":").slice(2).split(","); 
  }
  
  show(catNames("born 20/09/2004 (mother Yellow Bess): " +
            "Doctor Hobbles the 2nd, Noog"));
  </code></pre>