Why is the test in {test () {}} recognized as a function?

as the title

clipboard.png

Why is test in {test () {}} recognized as a function?

Mar.24,2021

{test(){}}

{
    test: function(){
    }
}

see http://es6.ruanyifeng.com/-sharpdo.

Menu