mercredi 17 novembre 2021

Javascript random given string every refresh [closed]

Every new refresh, i'd like to show a different (given) string

For example i give these values:

Apple
Orange
Melon  

Then, by refreshing, the page shows Apple,
I refresh again and get Orange

How i do that with Javascript?

Please attach a code snippet because im learning JS and it will be hard to create this

jsfiddle




Aucun commentaire:

Enregistrer un commentaire