0

i am trying to figure out the difference between != and !== in java script , is both ways are used to check the not equal to conditions? i am confused trying to get the difference . please any one give me solution?

example
----------

    <div ng-if="user!= user"> 
    show data 
    </div>

    (or)
    <div ng-if="user!== user"> 
    show data 
    </div>

    <script>
    $scope.user = 'user';
    <script>

i am clear with == and === , The == operator will compare for equality after doing any necessary type conversions. The === operator will not do the conversion, so if two values are not the same type === will simply return false. but i am not clear with above

Sukumar MS
  • 748
  • 1
  • 11
  • 42
  • 1
    It's the same as `==` and `===` but the result is negated. If a `==` comparison returns `true`, then `!=` would return `false`. – Mike Cluck Dec 07 '16 at 15:22
  • `null !== undefined` returns `true` and `null != undefined` returns `false`, i.e. the inverse of `===` and `==`. – musically_ut Dec 07 '16 at 15:22
  • != can be seen as not == and not !== as not === – Kevin Kloet Dec 07 '16 at 15:23
  • Should be noted that === isn't -just- value&type; create identical objects with Object.create() and Reflect.construct() and it'll return false. – rrd Dec 07 '16 at 15:43

0 Answers0