What is the use of {{product.getSalePrice ()}} of vue?

when I look at Vue-Essentials-Cheat-Sheet, I see the usage of

{{product.getSalePrice ()}}

. How does this work? How to write the js part?

Feb.28,2021

data() {
    return {
        product: {
            getSalePrice: function () {
                   ....  //do something
            },
            toString:function(){return 'productNmae'},
            valueOf :function(){return 23}
        }
    }
}

I guess so

console.log(product==23)//true

the method in the object, you can go like this:

data() {
    return {
        product: {
            getSalePrice: function () {
                   ....  //do something
            }
        }
    }
}
Menu