function changecolor(code)
{
document.bgColor=code;
}

This function changecolor acquires the  parameter "code".

The parameter is passed in from the event handler.

This value of the  parameter "code" is assigned to the background  property of this document.

Notice: this function contains only one line of code.

In this line of code the object document (meaning this document) property (being the background color)is assigned the value of "code".

I will discuss this later.