title: How get the text inside a paragraph with JavaScript
body: <p>I am trying to get the text inside p tag </p>
  
  <pre><code> &lt;p id="paragraph"&gt;Some text&lt;/p&gt;
  </code></pre>
  
  <p>And i want to store the text in JavaScript variable like this </p>
  
  <pre><code> var text = "Some text";
  </code></pre>
  
  <p>I read that i have to add </p>
  
  <pre><code> var text = document.getElementById("paragraph").innerHtml;
  </code></pre>
  
  <p>But the value of the variable is NULL or Undefined and i did also like this </p>
  
  <pre><code> var text = document.getElementById("paragraph")[0].innerHtml;
  </code></pre>
  
  <p>And i had the same problem !</p>