Object === Object vs String === String

Edit on GitHub

Setup

Tests

  • Object === Object

    var test = {"test": 1, "test2":{"test3": "test4"}};
    test === test;
  • String === String

    var test = "test1 test2 test 3 test 4 test 5";
    test === test