Lab2-Shalon
Link to Lab2
In this lab, we reviewed the different JavaScript commands we can use to display a message, such as the alert, confirm, prompt, document.getElementById, console.log, and document.write. This is why when the page first loaded, there were multiple alerts, prompts, and confirms windows that popped up. The two "Hello World" texts are document.write commands. The "chia mondo" is actually a regular p tag but is changed when you click no when it asks you "Do you want to change know that in Spanish?", if you clicked yes then the tet would appear as "demo". Although it cannot be seen on the webpage, there is a console log that appears when you go to Developer Tools. This lab's purpose was to learn the basics of JavaScript in order for us to use the skills in the future when we want to be more creative with our texts.
In this lab, we reviewed the different JavaScript commands we can use to display a message, such as the alert, confirm, prompt, document.getElementById, console.log, and document.write. This is why when the page first loaded, there were multiple alerts, prompts, and confirms windows that popped up. The two "Hello World" texts are document.write commands. The "chia mondo" is actually a regular p tag but is changed when you click no when it asks you "Do you want to change know that in Spanish?", if you clicked yes then the tet would appear as "demo". Although it cannot be seen on the webpage, there is a console log that appears when you go to Developer Tools. This lab's purpose was to learn the basics of JavaScript in order for us to use the skills in the future when we want to be more creative with our texts.

Comments
Post a Comment