Where to use a property or function in Knockout JS

I do not know where to use a property or functions. Could you explain in detail to me that hasCellphone is a function or property here. And when it can be a property or function. What should we use?
enable: hasCellphone or
enable: hasCellphone () and why so.

<input type='checkbox' data-bind="checked: hasCellphone" />
I have a cellphone

Your cellphone number:
<input type='text' data-bind="value: cellphoneNumber, enable: hasCellphone" />

<script type="text/javascript">
var viewModel = {
    hasCellphone : ko.observable(false),
    cellphoneNumber: ""
};
</script>
+3
source share
1 answer

How you set yourself, hasCellphonehow observable, it is observable. And as an official document:

. . , , , .

():

, , . , , ( ).

:

10 , KnockoutJS

+2

All Articles