javascript function get current date code example Example: get today's date javascript var today = new Date();