Hello,

I'm reading Simply JavaScript and I ran into a problem with an example from a book. I can't get nodeName to work properly. Am I doing something wrong?

Here's my code:

HTML Code:
<body>
  <h4 id="movieTitle">Analyze This</h4>

  <p>
    The film stars Robert De Niro as a mafioso and Billy Crystal as a psychiatrist.
  </p>
</body>
Code JavaScript:
var target = document.getElementById("movieTitle");
 
alert(target.nodeName);

Help me, please. Thank you in advance.