The toLocaleDateString() function of date object return string local date. Use it for example to get string local date.
Syntax
This will produce following result