Added code for ko.observable and ko.dependent observable and also demo link on jsFiddle