'Why is Date.parse function parsing "Lender Series Email 2" string but not "BrokerVIPemail5 2" string?

How does the Date.parse function parse its value?

Date.parse("BrokerVIPemail5 2") // NaN
Date.parse("Lender Series Email 2") // 980965800000

I don't know whether string is random string or date. How can I check if value is of date string?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source