title: How to uglify JavaScript using UglifyJS 2?
body: <p>I tried to uglify a simple javascript file using <a href="https://npmjs.org/package/uglify-js" rel="noreferrer">UglifyJS2</a>.</p>
  
  <p>Here are the contents of the file :</p>
  
  <pre><code>//this is simply a sample var
  var sampleVar = "xyz";
  
  //lots of comments
  //this is just another comment
  //such things should not be present in javascript
  //waiting to see result after uglifying
  
  //this is simply a sample function
  function sampleFunction()
  {
    var sampleLocalVar = "xzx";
    if(true)
    {
      //inserting some sample comments
      alert("in if block");
    }
    else
    {
      //inserting some sample comments
      alert("in else block");
    }
  }
  </code></pre>
  
  <p>Here's the command that I'm using to uglify:</p>
  
  <pre><code>uglifyjs -c -m sample.js sample.min.js
  </code></pre>
  
  <p>Error that I'm receiving :</p>
  
  <pre><code>Dot
  Error parsing arguments in : sample.js
  </code></pre>