<script>
var $body = document.getElementById("body")
var $rainbow = document.createElement("p")
var Colors = ['red','orange', 'yellow','green','turquoise', 'blue', 'purple']
$body.addEventListener("click", function(e){
var random = Math.floor(Math.random () * (Colors.length))
var randomColors = Colors[random]
$body.appendChild($rainbow)
$rainbow.textContent = 'Clicked!'
$rainbow.style.color = randomColors
$rainbow.style.fontWeight = 900
$rainbow.style.margin = '0'
$
rainbow.style.top = (e.clientY - 10) + 'px';
$rainbow.style.left = (e.clientX - 25) + 'px' ;
$rainbow.style.position = 'absolute'
})
</script>