Question: Instructions Start where you left off in the previous lab (personal website). Do the following tasks in a new branch: Create a JS file and
Instructions Start where you left off in the previous lab (personal website). Do the following tasks in a new branch: Create a JS file and save it in a separate folder. Add a line in course.html page to load and run the JS file (don't forget the appropriate attribute). In your JS file: Define a constant array called courseList. This array should have at least 3 items in it. Each item should be in the format of a JS object: with code and name properties. e.g. { code: \"ACIT 1620\", name: \"Web Fundamental Technologies\"}. o Get a 4-digit number from the user e.g. 1620. Prompt the user again if invalid data (e.g. a string or a number with fewer digits) is entered. o Write a loop to iterate through courseList array and check if the \"code\" property of any of the items in the array contains the provided number by the user. If yes, log to console Yes I am taking the course: ACIT 1620 - Web Fundamental Technologies\" (use template literal to generate this string) . If not, add a new object to the array with code property equal to the value user entered, and null for the name property. Log a success message to the console. Merge your code back to the main branch and push the changes to your remote repo. Submit your GitHub repo link along with your zipped folder.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
