title: Meaning of !! and how to use it
body: <p>I am writing a code using WebStorm IDE, and I wrote an </p>
  
  <blockquote>
    <p>if statement</p>
  </blockquote>
  
  <p>in a method like this:</p>
  
  <pre><code>createEvent():boolean {
    return this.http.post('/event', { params: {name , location} }).map(res =&gt; res.json()).map(res =&gt; {
  
      if(event &amp;&amp; event.success){
        return true;
      }
  
      return false;
    });
  }
  </code></pre>
  
  <p>Then the IDE suggest I rewrite (simplify) the if statement this way:</p>
  
  <pre><code>createEvent():boolean {
    return this.http.post('/event', { params: {name , location} }).map(res =&gt; res.json()).map(res =&gt; {
      return !!(event &amp;&amp; event.success);
    });
  }
  </code></pre>
  
  <p><strong>I find it confusing while the system uses a double NOT sign.</strong></p>
  
  <p><em>Please I need some explanation.</em></p>