How would use classes in js bouncing ball

Hi i’m a newb trying to learn classes in js - how would I make a simple a bouncing rectangle or circle that bounces off the walls using classes -
Thx!