innerHTML of null error : <p>Using <code>console.log</code> I am able to see value coming from another page, but when I am placing this value using <code>document.getElementById('abc').innerHTML = xyz.age;</code> it's giving me error of <code>Uncaught TypeError: Cannot set property 'innerHTML' of null</code></p>

<p>My JS</p>

<pre><code>xyz = JSON.parse(sessionStorage.getItem("details"));
document.getElementById('abc').innerHTML = xyz.age; //getting error from here
console.log(xyz.age);
</code></pre>

<p>Can you guyz help me out</p>
