CHECK24 interview question

It was a Coding challenge in nodejs.