1) Does all javascript focus on displaying things on a canvas?

2) Can I have help with collision detection involving rectangles and circles? I know how to find if a certain point has collided with a circle ["if(dist(x1, y1, cirlceX, circleY) < circleSize / 2) {...}"] but I don't know how to tell if an entire rectangle has collided with a circle, unless I write an incredibly large amount of code.