title: Using Javascript to get current Browser and print on HTML
body: <p>Basically I'm new to JavaScript and for my website I found a website detection code that is done by duck typing and I need to implement a feature where it prints the specific browser someone is using and I don't understand how I would go about doing it.</p>
  
  <p>Here's the code: <a href="https://jsfiddle.net/311aLtkz/" rel="nofollow noreferrer">https://jsfiddle.net/311aLtkz/</a> (found code on stack overflow)</p>
  
  <pre><code>var output = 'Detecting browsers by ducktyping:&lt;hr&gt;';
  output += 'isFirefox: ' + isFirefox + '&lt;br&gt;';
  output += 'isChrome: ' + isChrome + '&lt;br&gt;';
  output += 'isSafari: ' + isSafari + '&lt;br&gt;';
  output += 'isOpera: ' + isOpera + '&lt;br&gt;';
  output += 'isIE: ' + isIE + '&lt;br&gt;';
  output += 'isEdge: ' + isEdge + '&lt;br&gt;';
  output += 'isBlink: ' + isBlink + '&lt;br&gt;';
  document.body.innerHTML = output;
  </code></pre>
  
  <p>Question is that how would I implement a feature that it would print the browser being used as a text in html.</p>