title: How do I hide broken images in javascript?
body: <p>I have my image inside an if statement:</p>
  
  <pre><code>if (item.image)
     historyHtml += '&lt;a href=' + item.image + ' class="image" target="_blank"&gt;&lt;img src="' + item.image +'" width="111px"/&gt;&lt;/a&gt;';
  </code></pre>