How to check if a collection exists and delete it?

A driver is language specific, not version specific. Which language, java, js, rust, go?