How to convert each of string dates, e.g., form ”2022-09-27” to new Date(‘2022-09-27’)


This Content is from Stack Overflow. Question asked by Ethan

how to convert the array of dates [‘2022-09-27’, ‘2022-09-26’, ‘2022-09-29’, ‘2022-09-28’, ‘2022-10-01’, ‘2022-10-02’, ‘2022-10-03’] to new Date (‘2022-09-27’),new Date(‘2022-09-26’)


This question is not yet answered, be the first one who answer using the comment. Later the confirmed answer will be published as the solution.

This Question and Answer are collected from stackoverflow and tested by JTuto community, is licensed under the terms of CC BY-SA 2.5. - CC BY-SA 3.0. - CC BY-SA 4.0.

people found this article helpful. What about you?