Question: how to convert mm/dd/yyyy to yyyy-mm-dd in js?
Answer: To format a JavaScript date into “yyyy-mm-dd” format, use the toISOString() method. It converts using ISO standard i.e.