I have a simple function that creates an image and the src is a random image from splash, but every time i call the function it generates the same image, why and how to fix it
function randomImage(){
const img = document.createElement('img')
img.src = 'https://source.unsplash.com/random/500x500'
document.body.appendChild(img)
}
As far as i understand each function call is dependent from each other so why each function call in this example generates the same image despite the link itself should generate a random link