In js, what method is called when the date and number types are compared with =?

normally, when comparing object and number types, the valueOf method will be called first. If the return value is not the original type, the toString method will be called. If the return value is not the original type, an error will be reported.

but I tested the date object, and that doesn"t seem to be the case.

clipboard.png

I compare the return value of valueOf, which is false, but when I rewrite the toString and valueOf methods, the comparison will be the same as other object types, reporting an error.

so I would like to ask, which method is called first when comparing number and date types?

Sep.30,2021
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1ea804d-1e9d.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1ea804d-1e9d.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?