I don't know how to test this

https://replit.com/@imcute-aaaa/physics-lib#script.js(sorry about not using snap)
I think that I definitely made some dumb errors there,but I don't know where.Can somebody read the code and find dumb errors?

This isn't snap related, so it shouldn't go in #help. Also, I'm not even sure if this should even be on the forum.

Yeah, I agree, you should find a JS forum. Maybe on stackoverflow?