title: Javascript function should throw an error if called without arguments or an argument is undefined
body: <p>Help! I'm being interviewed on Tuesday, including a test on testdome.com... I looked at some of their "easy" javascript practise questions, and I'm stumped on this one:</p>
  
  <p>Implement the ensure function so that it throws an error if called without arguments or an argument is undefined. Otherwise it should return the given value.</p>
  
  <pre><code>function ensure(value) {
  
  }
  </code></pre>
  
  <p>So far, I've got:</p>
  
  <pre><code>function ensure(value) {
    if(value){
      return true;
    }
  }
  </code></pre>
  
  <p>But how do I check if if the function is called "without arguments or an argument is undefined"?</p>
  
  <p>I've tried a few things, like: else if (typeof value === 'undefined'), but that doesn't seem to work...</p>