js-test-26

Equal or not?

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

In the first two lines we create new Date objects.

In line 4, we’re using the strict equality operator ===. Remember that we’re comparing different objects!

Even if date and date2 represented the same date, the check would have returned false.


ANSWER: The string not so much will be printed to the console, as date1 and date2 are different objects.