3vil8unny / javascript-course-repo

https://lab.github.com/bitprj/javascript-with-html-and-css
0 stars 0 forks source link

Week 3 #13

Open github-learning-lab[bot] opened 3 years ago

github-learning-lab[bot] commented 3 years ago

Task 1: Gathering your existing code

This step will simply guide you through starting a JavaScript file and copying your code from last week's assignment.

Open new css and html in visual studio code in your week 3 folder. This week will involve a little more JavaScript code, so you may want to make a separate JS file this time. You can save it as "script.js" and link this file to your HTML file by adding the following line in your head, right below your CSS file link:

<script defer src="script.js"></script>

In script.js, you can copy and paste everything that was inside the script tag (except for the script tags themselves) for your week 2 clock, you'll just want to delete the lines that calculate the time and print it onto the screen - this should be everything inside your "showTime()" or similarly-named function.

You can also copy your HTML from last week, but make sure to remove the JavaScript code from your HTML document, as well as the script tags, and replace it with the script tag above. Your CSS code from week 2 can also be copied as long as you clear out the styling in the .clock selector.

If you've copied and filtered all your code correctly, this is what your page should look like:

timezone-3-1

Open a pull request for your code

Once again, be sure create a new branch, titled [your GitHub username]-[week]-[task number], for your task. For reference, my username is danzelo1 so my branch would be titled danzelo1-3-1 for this task.

After you've created your branch, commit your code to this branch and open a pull request to merge with your main branch. Be sure to title and comment your pull request appropriately.

As long as there are no conflicts with the base branch, you can now merge your pull request with your main branch. From here, click on "Issues" on the top left of your screen, below the name of your repository, and click on the week (week 3). A new comment should have appeared for your next task where you'll find the instructions for task 2.