<script>
f = new Array();
f.push('h');
f.push('a');
f.push('i');
f.push('l');
f.push('e');
f.push('r');
f.push('i2');
f.push('s');
t = f.length;
face = f[Math.floor(Math.random() * t)];
document.getElementById('img').innerHTML = '<img src="' + face + '.png" alt="something" />';
</script>
It does not work i am trying to make an array that randomize the images and shows them to the user, but it is not working and i dont know why