Making a javascript knockout viewmodel without the new keyword
问题 I'm looking through the knockout tutorials, and all the examples create the view model using the 'new' keyword: //from learn.knockoutjs.com function AppViewModel() { this.firstName = ko.observable("Bert"); this.lastName = ko.observable("Bertington"); this.fullName = ko.computed(function() { return this.firstName() + " " + this.lastName(); }, this); } ko.applyBindings(new AppViewModel()); I'm trying to avoid using the new keyword, which usually works perfectly ok, but I find trouble getting