Https://www.codecademy.com/courses/learn-javascript/lessons/javascript-dom/exercises/document-object-model?action=lesson_resume


#1

https://www.codecademy.com/courses/learn-javascript/lessons/javascript-dom/exercises/document-object-model?action=lesson_resume

I do not see a reference to the DOM in the dropdown when creating this question so it will be categorized incorrectly.

Here is my code....

var skillset = document.getElementsByClassName ( 'skillset');

The instructions:
1.
Let's see how JavaScript can select an HTML element.

Inside index.html, notice there's an

element with a class of skillset on line 10. Let's select this element with JavaScript.

Click on the folder icon to navigate to js/main.js.

Inside main.js, delete the alert you wrote in the last exercise. Then, create a variable named skillset and set it equal to the HTML element with the class skillset.

The Hint:

document.getElementsByClassName('skillset');

Yes, I know there are further instructions like the alert box, which I did thinking it might make it trigger as being complete but it didn't.

My body in html file does have the script tag referring to the js file.
I tried logging out of codecademy, restarting my browser, signing back in, and restarting the assignment. Nothing.

What am I missing please?


#2

var skillset = document.getElementsByClassName ( 'skillset');

remove the space before (


#3

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.