how to calculate the area of a circle in js code example Example: javascript perimeter return 2*(length + width); // for a rectangle