School of Computing. Dublin City University.
Online coding site: Ancient Brain
coders JavaScript worlds
https://humphrysfamilytree.com/Icons/logo.rotate.0.jpg to https://humphrysfamilytree.com/Icons/logo.rotate.9.jpg
<script> var i = Math.random(); document.write ( "<p> Random number: " + i + " </p>" ); </script>
document.write ( "<p> Random number: i </p>" );
var thearray = [ "https://humphrysfamilytree.com/Icons/logo.rotate.2.jpg", "https://upload.wikimedia.org/wikipedia/commons/thumb/f/f5/Gioconda.jpg/400px-Gioconda.jpg", "https://humphryscomputing.com/3d/Images/earth.1.big.jpg" ]; var i = Math.floor ( Math.random() * thearray.length ); // returns random 0 to (thearray.length - 1) // display i to check it var url = .... // get the ith element of the array (see Array docs) .... // display the image inline