Algonomy interview question

Implement singleton pattern in JavaScript