How to store old random value in variable

Hello all,

currently building an app which generates random Bible verses with a random colour background change too on each click. I am currently have an issue with two things when the ‘Show me another’ button is clicked:

  • Sometimes verses repeat themselves
  • The background colour also repeats itself sometimes

I have tried creating a new variable which stores the old colour and also old verse to no avail. I’m not sure where I am going wrong. (ANGRY verses for the sake of this question)

Here is my attempt in which the Open Bible button refuses to work at all:

Here is the JSFiddle without my attempt:

Any suggestions or help would be greatly appreciated.

why don’t you show what you have attempted?

Have edited :slight_smile: Thanks.