What is exactly the difference between classes and namespaces in TypeScript? I know that if you create a class with static methods you can access them without instantiating the class and that is exactly one of the points of namespaces I guess. I also know that you can create more than one Namespace with the same name and their methods
Tag: namespaces
Benefit of using ‘window’ prefix in javascript
Are there any benefits to using the ‘window’ prefix when calling javascript variables or methods in the window object? For example, would calling ‘window.alert’ have an advantage over simply calling ‘alert’? I can imagine using the prefix could give a small performance boost when the call is made from inside some function/object, however I rarely see this in people’s code.