For our Jekyll Static read.me site
![]() |
Home | DS Project | Test Prep/Notes | Create Task |
<script>
const good = [ "That's not the worst", "OK you'll be fine", "Stay safe!" ];
const bad = [ "Evacuate your family immediately.", "GET OUT. NOW!", "Find shelter immediately!" ];
</script>
`<script>
function magnitude(mag){
if ((parseInt(mag) == 1) || (parseInt(mag) == 2) || (parseInt(mag) == 3)) {
const magni = Math.floor(Math.random() * good.length);
console.log(magni, good[magni]);
document.getElementById("arrPrint").innerHTML = good[magni];
}
else{
const magni = Math.floor(Math.random() * bad.length);
console.log(magni, bad[magni]);
document.getElementById("badPrint").innerHTML = bad[magni];
}
}
</script>