Full-stack dev quiz question #1

Full-stack dev quiz question #1 The first question in the quiz for a full-stack developer is about the difference between == and === equality operands in JavaScript.

quizThe first question in the quiz for a full-stack developer is about the difference between == and === equality operands in JavaScript.

 

 

 

What result (true or false) is produced by the last expression in each of the following JavaScript blocks?

  1. var a = 3;
    var b = 3;
    a == b
  2. var a = 3;
    var b = 3;
    a === b
  3. var a = 3;
    var b = a;
    a == b
  4. var a = 3;
    var b = a;
    a === b
  5. 1 == 1
  6. 1 === 1
  7. 1 == "1"
  8. 1 === "1" 
  9. 1 == "2"
  10. 1 === "2"
  11. 1 == 2
  12. 1 === 2

 

For answers scroll down

.

.

.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

.

.

.

1. true
2. true
3. true
4. true
5. true
6. true
7. true
8. false
9. false
10. false
11. false
12. false

More information about equality operators can be found in a separate article.

We use cookies

We use cookies on our website. Some of them are essential for the operation of the site, while others help us to improve this site and the user experience (tracking cookies). You can decide for yourself whether you want to allow cookies or not. Please note that if you reject them, you may not be able to use all the functionalities of the site.