How can I avoid retyping the same function in my team members?
<p>How can I avoid retyping the same function in my team members? The <code>say_name</code> function can be used by all members in team obj. How to write my code?</p>

<pre><code>&lt;script type="text/javascript"&gt;
var team={
  // member
  jimmy:{
    name:'jimmy',
    say_name:function (){}
  },
  darcy:{
    name:'darcy',
    say_name:function(){}
  },
  // common functions
  say_name: function(){
    // every member has the say_name function, I don't want to write the same code in each member. How to do?
    alert('my name is ??')
  }
}
&lt;/script&gt;
</code></pre>
