How to Implement SOLID Principles in JavaScript