title: javascript function parameter place
body: <p>How to write function(object) with 2 methods (alert and console.log) to be able to use it like this:</p>
  
  <pre><code>fname("text").alert //-now text is alerted;
  fname("text").cons //-now text shows in console log. 
  </code></pre>
  
  <p>the methods are not important byt the way of execution. I know that it must be self invoiking function but i cant do it. I dont want to use it this way -  fname.alert("text").</p>
  
  <p>Greetings
  Kriss</p>