JS: Date

less than 1 minute read

<script> 
  
  // Using Date() function 
  var d = Date(); 
    
  // Converting the number value to string 
  a = d.toString()  
    
  // Printing the current date 
  document.write("The current date is: " + a) 
    
</script> 

//output: The current date is: Fri Jun 22 2018 11:02:01 GMT+0530 

Updated: