obj vs obj vs num vs num

Edit on GitHub

Setup

var objA = {};
var objB = {foo: 'bar', rattle: { snake: 'snek' };
var intA = 12;
var intB = 32423564353;

Tests

  • obj vs obj

    var x = objA === objB || objA === objA;
  • num vs num

    var x = numA === numB || numA === numA;