For this Lab #8 we had to make a table of al the prime numbers between 1 and 1000. This lab was confusing at first because it was only a chart and it had to do with JavaScript. The class is still fairly new to Javascript so that it was makes the lab a little more complicated. In order to complete this lab we needed a table first to put the prime numbers inside. This was part of the HTML code and inside I inserted the code to link the JavaScript file to the Html file. By doing this all the prime numbers would be in the table.
In the JavaScript file we used the function findPrime to get the prime numbers. We also used e<1000 so that we would only get the prime numbers that are less than 1000. Using these functions was very hard to trouble shoot because you aren't sure what the problem is in the code. Also, one little mistake can make the whole thing not work which makes you really focus on everything that you type. This lab can help me in my future because it gives me more experience with Javascript and also troubleshooting my mistakes helps.

No comments:
Post a Comment