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?
There are many ways to do what you want:
if ( null != self.nscto() && "" === self.nscto() ) { self.view(true) }
or
if ( null != self.nscto() && self.nscto().length === 0 ) { self.view(true) }
or simpler
self.view( null != self.nscto() && "" === self.nscto() )