This forum is now read-only. Please use our new forums! Go to forums

0 points
Submitted by Virginia
almost 9 years

Lesson 5/12: Is it == or ===?

Here’s the code that works:

if(nextSlide.length == 0) {
        nextSlide = $('.slide').first();
    } 

Why is it:

(nextSlide.length == 0) vs. (nextSlide.length === 0)

Is it the difference between “text” and a number?

Answer 55806a7d9113cbbf2c000197

0 votes

Permalink

google search = the Book = javascript comparison operator site:developer.mozilla.org https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Comparison_Operators == equality operator === strict equality operator

= discussions / opinions = javascript == vs === operator site:stackoverflow.com

= guidance = www.crockford.com http://javascript.crockford.com/code.html http://javascript.crockford.com/survey.html https://developer.mozilla.org/en-US/docs/Web/JavaScript/A_re-introduction_to_JavaScript

points
Submitted by Leon
almost 9 years