-3

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!

  • 1: https://stackoverflow.com/questions/359494/which-equals-operator-vs-should-be-used-in-javascript-comparisons – luk2302 Jun 19 '20 at 13:04
  • For your first line item see this https://www.tutorialspoint.com/What-is-the-difference-between-and-in-JavaScript – CAMD_3441 Jun 19 '20 at 13:04

2 Answers2

0

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

Snahashis
  • 16
  • 1
0

Triple === checks for strictly typed values meaning both types of compared values must be the same

Double == checks if the values are the same. Focus on the basics of JS/ES6 before Angular