JavaScriptJavaScript convert date to long date formatJavaScript date is a function to convert a date string to a parsed date format. It could be a long…