Posts by unknown • 43 points
1 post
-
4
votes1
answer52
viewsQ: Does accessing a variable outside the scope of the class go against SOLID principles?
const clients = [{ username: "test" }]; class Validator { constructor(username){ this.username = username; } isUsernameTaken(username) { let usernames = []; clients.forEach((e) =>…