Sunday, December 11, 2016

Lab 7 Reflection Journal


        For this lab I had to create a mad libs game in where I ask the user to give me nouns, adjectives, and verbs. Then I replace the blank spaces in the mad libs with the user's input. I first created the html document and applied my overall css to it. Then after I put in my headings, I put the mad libs story in a paragraph. I put the span tag around the nouns, adjectives, and verbs fill in the blank and gave them all an id name and put separate colors to be able to tell where the user's input went. After that, I created my javascript file where I had to create an array where I ask for a prompt (either noun, adjectives, or verbs), and I used the document,getElementById("idname").innerHTML to replace the text with whatever was put in the prompt.
       The prompt asks for adjectives 6 times, nouns for 11 times and for 1 verb. Then I tested it out and published it in thimble. I can see myself using this skill in the future for when I am doing a project that requires the use of arrays. This is relevant to web design because you can manipulate arrays by using the array name.concat or array name.push or array name.shift. Also the it would be more organized to use the array. I learned how to do something using a different method.

No comments:

Post a Comment