Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

JavaScript JavaScript Foundations Variables Null and Undefined

Zeeshan Dawood
Zeeshan Dawood
7,210 Points

How should the code be fixed in order to solve this problem

It is saying the variables are not equal, fix the code. For some reason I'm drawing a blank on what to do

index.html
<!DOCTYPE html>
<html lang="en">
  <head>
    <title> JavaScript Foundations: Variables</title>
    <style>
      html {
        background: #FAFAFA;
        font-family: sans-serif;
      }
    </style>
    <script src="ignore_this.js"></script>
  </head>
  <body>
    <h1>JavaScript Foundations</h1>
    <h2>Variables: Null and Undefined</h2>

    <div id="container">
    </div>

    <script>

        var myUndefinedVariable;
        var myNullVariable = null;

        if(myNullVariable == myUndefinedVariable) {
            identicall( 0);
    }

    </script>
  </body>
</html>

2 Answers

Rob Bridges
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
Rob Bridges
Full Stack JavaScript Techdegree Graduate 35,467 Points

So javascript is really weird, they have == to check to see if the types are more or less the same, and then they have the special === sign to see if they are an exact match and not "close enough" So all this challange is asking you to do is an an extra equal sign at the end of the == to make it ===.

Zeeshan Dawood
Zeeshan Dawood
7,210 Points

Now the word makes sense. Thank you!