SOLID Principles in JavaScript: What Does the "O" Stand For?

Written by serhiirubets | Published 2022/03/13
Tech Story Tags: solid-principles | solid | javascript | open-closed-principle | design-patterns | js | best-practices | oop

TLDRThis is the second article about SOLID principles with Javascript examples. In the previous article, I described what are patterns in general, what is SOLID, and why we should use them. The Open-closed principle says: Entities (classes, modules, methods, files, etc.) should be open for extension, but closed for modification. When we need to add a new validation from an external service, we should add new logic (if/else) to getErrors function, we do the modification.via the TL;DR App

no story

Written by serhiirubets | I'm a Fullstack JS engineer with 10 years of experience. Also, I'm a mentor, teacher, and author of front-end courses.
Published by HackerNoon on 2022/03/13