Explore what CodeHS has to offer for districts, schools, and teachers.
Click on one of our programs below to get started coding in the sandbox!
View All
This is a Rectangle object on our canvas named rect. Point A is on the bottom edge of the rectangle. How can we calculate the y-coordinate of point A?
rect
rect.getY();
rect.getY() + rect.getHeight();
rect.getX() + rect.getWidth();
rect.getX() - rect.getHeight();