I am reading an existing code. Initially, the code initializes the property 'Data':
self.Data = ko.observable({});
but afterwards, in some function the code assigns 'Data' to something like below. self.Data is not set to an observableArray but below, it is used as it is though an array. No other code touches self.Data before this line so when it hits this line but before assignment, it is still a ko.observable({}).
self.Data()[0] = ko.observable("");
I was thinking that this is a legal syntax for converting an observable object to an array in knockout.js, but if I try to immediately put an alert for it length like alert(self.Data().length), it is undefined.
My question would be what does this code actually do?