3. Javascript Programming (40 points)

Write the Javascript code to add a gradient to the HTML gradient section below. The gradient is formed by creating 20 shaded boxes, starting with the bigger boxes and moving forwards to the smallest box. The largest box starts at 400x400px and decrements in size by 20px each level. The color of the outermost box is rgb(255, 255, 255) and decrements by 10 values for each color (eg the second largest box would be rgb(245, 245, 245)).

...

<div id="gradient"></div>

After your Javascript code runs, the appearance and behavior should be the following:



Assume that the code will be placed into a .js file that will be included by the HTML document.