interface AI interview question

Design a Rate Limiter in Javascript