i have a condition in my function . i want to set a value of a variable true or false on the basis of another variable whether it is empty of not in knockout js?
self.editData = function (data) {
self.id(data.id());
self.nscto(data.nscto());
if (nscto != null && "".equals(nscto)){
self.view(true)
}
}
here i write if condition as we use in java language i want to use this scenarion in knockout how can i do it ?