Primitive to class equals

后端 未结 0 1893
不知归路
不知归路 2021-02-04 23:37

I am running into a problem here: This works in JavaScript

class X { valueOf() { return "."; } }

new X() == "." -> true

I

相关标签:
回答
  • 消灭零回复
提交回复
热议问题