Closed
Description
Repro
const foo = {};
console.log(foo.toString()); // warning (correct)
console.log(String(foo)); // no warning
Expected Result
2 warnings about foo
being stringified to [object Object]
.
Actual Result
Only the first statement triggers a warning, the second does not.
Additional Info
MDN documentation for String(…)
: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/String