I'm learning JavaScript. My background is traditionally in Java and C#. In those environments, I could use interfaces. A lot of times, I'd have a pattern that looked like this:
var implementers = GetForInterface<ISomeInterface>();
foreach (var implementer in implementers)
{
implementer.SomeMethod();
}
My question is, how do I do something similar in JavaScript? The main thing I can't seem to figure out is the GetForInterface part. I'm not sure what this design pattern is called.
Thank you