I'm trying to learn Knockout. In my little project, I want to type in a firstname, a surname, and add it to an array of 'people' objects - and then show the list in a table using a foreach.
https://jsfiddle.net/2pf07vdh/
I'm new to fiddler too, so don't think the knockout is loading (The little checkbox should hide and show stuff, but it's not), but with this, in my editor, I get an error:
knockout-3.4.1.js:72 Uncaught ReferenceError: Unable to process binding "foreach: function (){return People }"(…)
That's when the screen loads.
And then when I try add an object to my array, I get this:
knockout-3.4.1.js:14 Uncaught TypeError: Cannot read property 'length' of undefined(…)
Can anyone see why I'm struggling so much? I think maybe I can't declare the 'Person' object like this?