Question: Having the following test case: (find fiddle [**here**](https://jsfiddle.net/5qct25hu/))

```
var a = new Date();
var b = null;
var c = {test: "test"};

if(a)
    console.log(a); //--- prints the current date

if(b)
    console.log('null'); //--- never reached

if(c)
    console.log('test'); //--- prints 'test'

console.log(a && b); //--- prints null

```

Knowing that 

```
console.log(typeof null); //--- prints "object"
console.log(typeof c); //--- prints "object"

```

I expect the result of

```
console.log(a && b); 

```

to be **false** and not **null** as it shown in the example.

Any hint?

Answer: 
From [the MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Expressions_and_Operators#Logical_operators):

> 
> `expr1 && expr2` : Returns expr1 if it can be converted to false; **otherwise, returns expr2**
> 
> 
> 

`new Date` can't be converted to `false` (it's not [falsy](https://developer.mozilla.org/en-US/docs/Glossary/Falsy)), so `b` is returned.
From MDN:

> 
> Logical AND (&&) expr1 && expr2 Returns expr1 if it can be converted
>  to false; otherwise, returns expr2. Thus, when used with Boolean
>  values, && returns true if both operands are true; otherwise, returns
>  false.
> 
> 
> 

[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Logical_Operators)