How to draw an AI rectangle with wavy lines on one side?

The answer upstairs really surprised me!

Try mine.

Draw a straight line, select the back point effect, and distort-wave effect. Set the size and number of bumps you want, then select wavy line point objects, paths and outline strokes, then align the rectangles you want and cut off only the unnecessary places.