Can someone explain to me why the following is true:
let foo = {
A: [ 1, 2 ]
}
let bar = {
"A": {
"0": "1",
"1": "2"
}
}
assert.deepEqual(foo, bar);
Can someone explain to me why the following is true:
let foo = {
A: [ 1, 2 ]
}
let bar = {
"A": {
"0": "1",
"1": "2"
}
}
assert.deepEqual(foo, bar);
Copyright © 2021 Jogjafile Inc.
As the documentation says:
The
assert.deepStrictEqual()function does check the prototype too, andwill return false.