hi, i need help doing main.js
this was the question
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.

and i answered back
var skillset = ('skill-html')


In the lesson they explain
We can select an HTML element with JavaScript by selecting its class attribute, like this:

var header = document.getElementsByClassName('example-class-name');


Taking a closer look at the course....
You will have to select the =folder-image= on the left-hand-side of the =index.html= tab.


=click= on the js-folder and you will see the main.js file.

       main.js   <<click on this file to get a =main.js= tab.

After clicking on the now visible main.js tab
you will enter into this file
and will have to add the requested =Javascript= statements.

before using the RUN button
you will have to -click on the index.html tab
and add a HTML line
<script type="text/javascript" src="js/main.js"></script>
into the <head></section>
So in the end your -head-section should look like

  <link rel='stylesheet' type='text/css' href='css/styles.css'>
  <script type="text/javascript" src="js/main.js"></script>

Now =click= the RUN-button


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