Flash card website

Hi all,

I been running through the tutorials and now want to make a flash card website that has a question and then click reveal for the answer. I have tried now for 2 days to get this to work. I know i have to use arrays to get this to work then then maybe a counter so i can jump to particular cards.

I am using visual studio code and set up a index.html style.css and a main.js
so far i have got them to link together but im drowning in trying to figure out how to tackle this problem have attempted a few youtube breakdowns to manipulate a quiz ap but failing miserably.

can someone give me some guidance, i cant seem to step up into designing my own page yet to get this to work :frowning:

maybe im trying to learn the wrong way any advice could be appreciated as i dont want to waste another day just staring at blank screen with no progress…

We will need to see what code you have written? Do you have your code on Codepen or GitHub? If so, please post a link to the code you have written so far. Also, please explain in detail which section of code is not working as you expect.

Thank you.

I shall try get the code on gitHub
thanks

Hey again,

its pretty basic but i put it in Codepen

I just want a question to pop up then the answer next. finally i would like to be able to jump between cards in the deck.

https://codepen.io/scriptking1000/pen/VwLRyEy

thanks for the help

You are going to need to think a bit about the best data structure to store your cards data. I suggest create an array of objects, with the objects having a question property and an answer property. This will allow you to easily access both the question and answer for any card simply by referencing the applicable array index.

Thanks Randell ill give that a whirl.