My problem is that I want to get all months that have been in 2020 i.e. January, February, Marts, April, May, June, July and August, and add them to an array.
When I am using code below, I get the number 7 in variable month, which means it's August. Now I want to add 7, 6, 5, 4, 3, 2, 1, 0 to an array. How do I do that?
const d = new Date();
const month = d.getMonth();
I am new to typescript, I hope someone is able to help me. Thanks in advance.