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