Lab 8 Reflection

     Lab 8 was about debugging a webpage we were given from online. The webpage had a section displaying a quote and what was supposed to happen was a different quote would load every time the user refreshed. I started off by inspecting the files that were given as part of the webpage and found a .txt files in the snippets folders containing all the quotes. There was no JS so I created a function which stored all the quotes in an array and used a random number generator to pick one quote in the array to display on the webpage, using DOM to put the quote in the HTML. Since this function would be called whenever the webpage loaded or reloaded, that was all I needed to code.
     These skills are useful for a web designer because they help debug problems and achieve an intended functionality. There will often be times where the client wants something to happen on the site, like an animation or feature, but what is necessary to make it happen isn't there or there was a mistake somewhere in the code. This, obviously, will require looking into the code and seeing what's wrong but if you don't look in the right places or parts of the code most likely causing the problem, this can take a lot of time. This lab basically trains us to identify areas most likely relating to the problem, like the snippets folder or the lack of any JS in the main folders, and resolve the issue effectively.


Comments

Popular Posts