Answers for "check the constructor property to find out if an object is a Date (contains the word "Date"):"

0

check the constructor property to find out if an object is a Date (contains the word "Date"):

function isDate(myDate) {

    return myDate.constructor.toString().indexOf("Date") > -1;

}
Posted by: Guest on June-30-2021

Code answers related to "check the constructor property to find out if an object is a Date (contains the word "Date"):"

Code answers related to "Javascript"

Browse Popular Code Answers by Language