i want to understand why this comparison isn't working in javascript
i have an if statement in JavaScript, the problem (was its fixed now but I don't know why) when the parameters are val1 and val2 as objects, this Code works: if (typeof(val1) === typeof(val2) === 'object' && val1 !== null…