I am a novice in JavaScript and need some help. I have to display name[i] in an h1 header, so say for instance I write in "John" it would be displayed as

```
nhoJ

```

but when I try to put the h1 header around name[i] as it is now, it is displayed like this: 

```
n
h
o
J

```

Can anyone help me put an h1 header around name[i] and make it display properly?

```
<html>
<body>
    <script>
        var namIn = window.prompt("Enter Name, separated by space:" ); 
        var namAr = namIn.split("");
        var namArLen = namAr.length; 
        document.write(namAr + "<br /> Length: " + namArLen + "<br />"); 
        var name = namIn;
        for(var i = name.length - 1; i >= 0; i--) {
            document.write( "<h1>" + name[i] + "</h1>" );
        }
    </script> 
</body>
</html>

```