I send cover letter and resume to the company through career email. Shortly after I was given an assignment. The task was covering full stack development of web app. It was up to me to choose what frontend technologies to use. Due to poor judgement, I choose to explore completely new Javascript framework which led to many hours learning to wrap my head around it and trying to implement the app. After a week I had a problem with this framework that it would need some advanced (hacking) understanding to cover all needs of the web app.
I ditched this framework after 1 week and went with more popular one that was a better fit and better community support. The person who gave the assignment asked about the status of assignment after 2 weeks. I replied that it took time to learn and implement frontend but later I had to abandon the first framework.
A week or two I was working on the solution but later on, I discontinued the work. The company still appears attractive to me.
During this whole time I was unemployed for more than 7 month. How this situation would appear to company given abandoned task? Would being unemployed appear as I have lots of free time but was not motivated to deliver results?
What would be the best way to approach company for the position for the second time?