title: How to show IP as Text in HTML using JS?
body: <p>I have the following script in my HTML, however I get a Question mark instead of the actual IP:</p>
  
  <pre><code>&lt;script type="application/javascript"&gt;
      var myButton = document.getElementById("clickButton");
      var myText = document.getElementById("helloText");
  
      myButton.addEventListener('click A', doSomething(), false);
  
      function doSomething(json) {
  
          myText.textContent = (json.ip);
      }
  
      function getIP(json) {
          return json.ip;
      }
  
  &lt;/script&gt;
  
  &lt;script type="application/javascript" src="https://api.ipify.org?format=jsonp&amp;callback=getIP"&gt;
  &lt;/script&gt;
  </code></pre>