MapLarge Interview Question

Write JS functions for rotating a LineString 90 degrees clockwise.