Unable to clear development assignment of companies

After loosing my job i tried applying to few companies but i am not able to clear their assignment .I know javascript but each time i tried to do any stuff i feel myself lost.This has increased fear in my head that i cannot do anything in my life as a software developer.I am lost in such a way that i could gather my courage to do any task related to that.Need your advice should i quit or keep on going?