1. Does she really want to learn to code, or does it come from you? 2. Can she write any code? Does she have trouble with just defenitions or coding in general? 3. Maybe JS isn't for her? Maybe show her Python or another language? What I mean is that maybe syntax is a bit confusing to her. 4. Has she tried any books? How does she learn other stuff most efficient? 5. Maybe just let her code and search for problems on the Web? Maybe you are trying to teach her too much stuff at once.
IMO give her more space and help only in the most critical errors at the moment. Let her code, code, and code. You could help her by creating some snippets or cheatsheet that she could print and use next to a keyboard.
When I was first learning Java (at college) I had trouble with understanding a lot of concepts and it took me a long time to finally grasp them. Don't think about that clickbait articles that are all over the internet about people that have learned to code in a few months. They are just clickbait articles, that's all they are. Learning to code is not easy, it takes time, for some a lot of time. If it was easy, a lot more people would be programmers and that's not the case.