Skip to content

Latest commit

 

History

History
45 lines (29 loc) · 4.58 KB

Assignment-4.md

File metadata and controls

45 lines (29 loc) · 4.58 KB

Module 4 Coding Assignment

Coursera course: HTML, CSS, and Javascript for Web Developers

Let's write a little bit of Javascript programming code to practice what we've learned! Woohoo! :-)

Time to complete: About 30 minutes.

Ask questions in Discussions if you get stuck! We are all learning, and going through getting stuck and then unstuck (even with someone's help) can be a very valuable learning experience!

Summary: In this assignment, you are going to loop over an array of names and print out either a hello or goodbye to that name to the browser console. If the name starts with a letter j or J, you are to print out Goodbye JSomeName. If the name starts with any other letter, you are to print out Hello SomeName.

However, in order to do that printing you will have to use 2 externally provided libraries whose code is not 100% ready to be used. Using the things we've learned in this module, your job will be to fix the code in those libraries.

You will get some starter code to work with where all the steps of what you need to do are clearly spelled out for you.

Here is what you will need to do in order to complete the assignment:

  1. (If you haven't already) Create a GitHub.com account and a repository that you will use for this class.

  2. (If you haven't already) Follow the Development Setup Video (beginning of Module 1) instructions on how to create a repository and set it up such that you can host and view your finished web pages on GitHub Pages, i.e., GitHub.io domain name. You will need to provide that URL for your peer review.

  3. Create a folder in your repository that will serve as a container folder for your solution to this assignment. You can call it whatever you want. For example, module4-solution or mod4_solution, etc.

  4. You will need to download the starter files for this project and copy them into your solution container folder (e.g., into module4-solution). Since assignments and starter code get updated from time to time, don't assume that you have the latest version already on your system. The best way to ensure that you are working with the very latest starter code is either git clone the fullstack-course4 repository into a new directory OR, if you've already done 'git clone' previously, you can simply open up your command prompt (cmd on Windows or Terminal on Mac), navigate to the folder where the fullstack-course4 repository was previously cloned into and do: git pull.

    This will update your local copy of the repository with whatever changes have been made since the last update.

    As a reminder, the full repository URL is: https://github.com/jhu-ep-coursera/fullstack-course4

  5. Once the local repository on your system is up to date, YOU HAVE A CHOICE! If you want a slightly more challenging assignment, use the code in the "harder" folder as your starting point. If you want a slightly less challenging assignment, use the code in the "easier" folder as your starting point. The difference between the two starting points is that in the "easier" starting point, there are a few steps that are already completed for you.

  • Harder: If you want a slightly more challenging assignment, copy all the contents of the fullstack-course4/assignments/assignment4/assignment4-solution-starter/harder folder into your newly created solutions container folder for this assignment, e.g., 'module4-solution'.

  • Easier: If you want a slightly less challenging assignment, copy all the contents of the fullstack-course4/assignments/assignment4/assignment4-solution-starter/easier folder into your newly created solutions container folder for this assignment, e.g., 'module4-solution'.

    NOTE: the provided starter code will not run. It is up to you to follow the instructions to get it to run. Once you've copied the starter code of your choice into your solution folder, open up your solution folder in the code editor. Open up script.js file and follow the steps.

  1. When you are continuously working on the assignment, use Browser Sync and keep Chrome open to the Console tab of the Chrome Developer Tools. You will likely see errors there to start with. Follow the steps outlined in the starter code and those errors should go away by the time you finish the last step. If you still see errors at that point or you are not seeing the output you're supposed to see, you probably made a mistake somewhere, so look into that and investigate.

    Remember, if you are stuck, ask questions on the course Discussion forum.

  2. That's it!