title: js: default function of an object
body: <p>I have object with functions, and I can call this functions like this <strong><code>myobject.myobjectfunction()</code></strong></p>
  
  <p>But can I have default function which will be called like this <strong><code>myobject()</code></strong></p>
  
  <pre><code>let cat = {
    say: function(value) {
      console.log(value)
    },
    sit: function() {
      console.log("cat sit")
    }
    // default: function() {
    //  console.log(meow)
    // }
  }
  cat.say("Hi") //  Hi
  
  // cat() // Meow
  </code></pre>