title: how to randomly display only one 1 image from the array of object
body: <p>how to display single image randomly?
  I have created an array of objects where the images are been added now I need to display those images randomly but one at once and it will change in the next reload.</p>
  <pre><code>const index= () =&gt; {
    let gifGallery=[
      {
        src:'./Images/1.gif',
        value:1
      },
      {
        src:'./Images/2.gif',
        value:2
      },
      {
        src:'./Images/3.gif',
        value:3
      },
      {
        src:'./Images/4.gif',
        value:4
      },
     
  
    ]
    return (
     &lt;&gt;
     &lt;h1&gt;Gif Gallery&lt;/h1&gt;
     &lt;div&gt;
      {
       what should be the logic here?????
      }
     &lt;/div&gt;
     &lt;/&gt;
    )
  }
  </code></pre>