# Typescript vs Javascript

1 min read, 84 words typescriptjavascriptdifferences

# When to use classes and Objects?

Goal is to re-create more same looking objects from classes

If you don't have a need for the class, don't use them.

But you may find benefits of classes if you want to:

  • export the type definition
  • manage your dependencies with Dependency Injection
  • Unit Test your code
  • use multiple instances
  • use polymorphism

I suspect you may not be doing any of these.

link (opens new window)

Subscribe to our Newsletter

If you like my work and think it was helpful kindly support my work


Buy Me A Coffee