# How would use classes in js bouncing ball

**URL:** <https://forum.makecode.com/t/how-would-use-classes-in-js-bouncing-ball/2206>\
**Category:** Arcade\
**Created:** [May 24, 2020, 1:27pm UTC](https://forum.makecode.com/t/how-would-use-classes-in-js-bouncing-ball/2206 "2020-05-24T13:27:46Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![otorp2](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/otorp2/32/940_2.png) [@otorp2](https://forum.makecode.com/u/otorp2)\
**Post date:** [May 24, 2020, 1:27pm UTC](https://forum.makecode.com/t/how-would-use-classes-in-js-bouncing-ball/2206/1 "2020-05-24T13:27:46Z")

</div>

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!
