在尝试解析JS代码的逻辑,遇到下面这一段代码,不是很理解,希望能大致解释一下下面这段代码的作用。
function l(b, d, c, f) {
if (b[j] === d && d[j] === b)
return m;
b[j] = d;
d[j] = b;
var k = function(a, c) {
return null !== a && a !== e && a[c] !== e
}, i;
for (i in d)
!k(b, i) && k(d, i) && c.push("expected has key " + i + '", but missing from actual.');
for (i in b)
!k(d, i) && k(b, i) && c.push('expected missing key "' + i + '", but present in actual.');
for (i in d)
i !== j && (a.equals(b[i], d[i], c, f) || f.push('"' + i + '" was "' + (d[i] ? d[i].toString() : d[i]) + '" in expected, but was "' + (b[i] ? b[i].toString() : b[i]) + '" in actual.'));
a.isArray(b) && a.isArray(d) && b.length !== d.length && f.push("arrays were not the same length");
delete b[j];
delete d[j];
return 0 === c.length && 0 === f.length
}