Creating a simple flashcard app using javascript