Forum Replies Created
I see, thanks.
Thanks for your help!
Do you mean that I should just declare them and leave them empty until I assign them later, like this…?
var jon1, jon2, jon3; var jon1 = document.getElementsByClassName("content"); var jon2 = jon1.getElementsByTagName("article"); var jon3 = jon2.getElementsByTagName("a"); console.log (jon3.innerHTML);
OK I’ve moved back to this thread and looked through your jsbin answer and I totally get it now. However, I tried your next question and got an error. I know I’m very close but cannot figure out what I am getting wrong: https://jsbin.com/suqorexele/edit?html,js,console
yes, I believe I have it now!
So when I looked at the answer I realized I was not there since I had not really studied the video on innerHTML. I just started working on it, and on my first try am already having issues. I’ll open a new thread with my error log, and once we sort that out, I’ll come back here and work on your additional example.
So I tried for about 20 minutes or so but didnt get very far, this was as far as I came up with: JSBin
So I think I get it. Just to see the contrast, could you code out the same example without querySelector to see the difference? I think it would help to see the advantage with a side by side comparison, thanks!
If you are using Chrome, you can use this extension as a temp solution: