JavaScript: Optional callback?
<p>I have coded a function, that has 3 arguments, one of them is a callback function.
How do I make the callback an optional argument without having to code another function without the callback argument?</p>

<pre><code>function myFunction(arg1, arg2, callback){
    // do something

    // callback() if it has been passed
}
</code></pre>
