comparison bug
Not a Problem
console.log(Int32(5) === Int32(5));
console.log(Int32(5) == Int32(5));
console.log(Int32(5) == 5);
prints
false
false
true
Only the last one makes sense. Help!
console.log(Int32(5) === Int32(5));
console.log(Int32(5) == Int32(5));
console.log(Int32(5) == 5);
prints
false
false
true
Only the last one makes sense. Help!
looks like if you cast to Number if works...initial tests seem that way:
console.log(Int32(5) === Int32(5));
console.log(Int32(5) == Int32(5));
console.log(Int32(5) == 5);
console.log(Number(Int32(5)) === Number(Int32(5)))
yield:
false
false
true
true
looks like if you cast to Number if works...initial tests seem that way:
console.log(Int32(5) === Int32(5));
console.log(Int32(5) == Int32(5));
console.log(Int32(5) == 5);
console.log(Number(Int32(5)) === Number(Int32(5)))
yield:
false
false
true
true
Int32(5) is a object. two objects are equal if they refer to the exact same object. please refer to :https://stackoverflow.com/a/6402977
To compare objects, please use ._.isEqual
Int32(5) is a object. two objects are equal if they refer to the exact same object. please refer to :https://stackoverflow.com/a/6402977
To compare objects, please use ._.isEqual
Ah. My apologies. Thank you!
Ah. My apologies. Thank you!
Replies have been locked on this page!