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