empty date object javascript code example Example: how to set empty date in javascript var date = Date.parse(dateString) || 0;