home..
Web Basics Review Ticket
September 2023 (147 Words, 1 Minutes)
Review Of Programming Basics
Basics of HTML
- I did all the requirements of the project but also decided to add my own version of a lorem ipsum program
- Thanksgiving themed lorem ipsum
- I had no major issues when setting up the wireshark, although the javascript lorem ipsum does not display on the website even though it does on vscode
Basics of Javascript
- I finally learned how to use math.random and math.floor when figuring out how to code this
- Basically, the code just generates a random decimal between 0 and 1 and then multiplies by 100 and then flooring to get an int between 0-100
- I actually forgot that I needed to use else if instead, but chatGPT helped me fix the error
DOM
- I basically just reused the code from the html besides the lorem ipsum
- I got the buttom to switch the links, but it didn’t look display “switched!” until Jason shared his code with me
Datatypes
- So for this hack, I decided to create an object that was missing stuff before adding it on by manipulating the arrays
- I got the change to learn how to use splice
- The biggest issue I faced was that when I wanted to print the original object, it was printing the updated one. I found the solution online where I just had to turn the string into a JSON file
- It essentially just took a “snapshot” of the function right before it was changed
Correcting Errors
- I decided to just follow the instructions and change the code as needed
- The only issue I faced was that when I was trying to use a for loop, I wasn’t setting i = 0 as a variable so that was causing an error in the code. Thankfully, the error message helped me identify and fix the error