Nikon D40 has a rectangle with yellow ‘waves’ in it on the digital screen

The only thing that comes to my mind would be the histogram:

enter image description here

Hit the ‘play button’ so you see the single image (with histogram). Then hit the ‘up’ or ‘down’ buttons on the wheel on the right side of the back of the camera.

That cycles through two information screens, histogram and regular display.