I get 0. However, I have three <li> in my document.
When I run
var listItems=document.getElementsByTagName("*") ;
I get a length of 5 in my alert (<html>, <head>, <title>, <meta>, <script>, ). I tested for these tags individually (e.g. getElementsByTagName("html");) and they are accounted for.
Why am I unable to target the body, ul, or list tags? I checked my document and it's essentially the same as the book's, except for the text between the elements.
What is it that I am missing?