Guest_imported
New member
- Jan 1, 1970
- 0
I am trying to figure out how to solve this problem. I need to create a table of various rows and columns--the rows and columns is entered by the user. I have to do this w/ a while loop, but I can't figure out how to make it universal enough to where every table will display correctly. I have to do up to a 20x20 table, so listing out all the possibilities of tables w/ all the code isn't an option. Also, once I get those tables to render correctly on the browswer no matter how many rows or columns are entered, I have to use the random function to make the color of the table. I understand how to make random numbers using the Math.random function, but the colors of tables can also have a,b,c,d,e,f as options also. My teacher says "use a loop to generate the 6 random hexidecimal digits for each table cell background color. HELP!!