Need help with main loop in Simon Game and using setTimeout

Hello there. I am hoping someone can help me with making progress on the Simon Game challenge. I posted a question on the HelpJavascript Gitter page but I don’t think anyone has time to look at my code there. I am confused about using setTimeout in the main control loop and have only got as far as getting the part that plays the notes and then lets the user interact with the board. I would so appreciate it if someone could let me know if any my loop examples are close to what should be correct. None of them work. My code so far is posted on github,
and you can see it “not working” at this link,
thanks for any help!
Margaret G.