TypeError listOfNames.split is not a function
<p>I am very new to coding and javascript and working on a project at school. I am not into the answers as it does me know good to be given them.  however, I am stuck at a part of my program and I am unable to go any further in my testing.  wondered if someone could share a little insight as to why I would be getting typeError is not a function on the listOfNames.split(" "); area of my code as provided to me by the console.  It is very frustrating that I cant seem to figure our why.  Thank you in advance.  Here is what I have so far.  </p>

<pre><code>     var realNinjas = [
       'Chuck Norris',
       'Jackie Chan',
       'Lucy Liu',
       'Billy Blanks',
       'Michelle Yeoh',
    ]
    var createListOfObjects = function(listOfNames){
    var nameList = listOfNames.split(" ");
    var namesArr = [];
    // var firstName = [];
    // var lastname = [];
       for (var i = 0; i &lt; nameList.length; i++){
           namesArr.push("firstName:" + nameList[0], " " + "lastName:" +            nameList[1]);

   }
         return;
   //OUTPUT: List of strings
}
var ninjaListOfObjects = createListOfObjects(realNinjas);
</code></pre>