Interview Q&A / Object-Oriented Programming
Object-Oriented Programming interview questions
The four pillars, interfaces, abstract classes and design basics.
Prefer rapid revision? Practise Object-Oriented Programming short interview answers →
- How do you do dependency injection in JavaScript without any framework?
Pass the dependency as an argument, either to a factory function or a class constructor. A function that receives what it needs is already using dependency injection.
BeginnerQuick answer1 min read