Search code examples
javascriptangularstandards

Angular Guidance with ===, returnaspromise, and class objects


I'm currently using Angular and the project that I'm working on has set coding standards. I'm confused with a few things:

  1. What is the difference between using '===' and '=='?

  2. What're the benefits of using 'returnaspromise' rather than an observable?

  3. What are all of the elements needed to create a full class? (i.e. class, constructor, and code that goes along with it?)

There's a lot that I'm confused with and hope that someone can help! Thank you!


Solution

  • == checks for values while comparing whereas === checks for value and type as well.