I'm getting the following error for a simple function below:
TypeError: document.getElementsByTagName("p")[0].innerHtml is not a function
I'm just trying to understand the usage of getElementsByTagName.
function myFunc(){ document.getElementsByTagName("p")[0].innerHtml("hello my name is vaani"); }
Can someone tell me on where i'm going wrong?