The point of this lab was to list in a table all the prime numbers from 1 to 1000 using JavaScript. So as far as html coding went, the only html that was done, as you can see below was the creation of a table border as well as the headings and the one paragraph tag that describes the lab. As you can see below,the code starts off by telling the java script to find prime numbers ranging 0 to 1000. The function "isprime" represents how to find the prime numbers by square rooting "n" or each number that is on the list and make sue a number is a perfect square or not. The last part of the code is makes the table. To put it simple, the table made it easier to organize all the numbers in one place.
.
No comments:
Post a Comment