JSFiddle - React, Tailwind, and code Playground
by Ryan
HTML
<h1>Ping Pong!</h1>
CSS
#ball {
background-image: url("http://dtc-wsuv.org/rgrover14/pingpong/ball.png");
background-repeat: none;
height: 96px;
width:96px;
}
ul {
margin-top: 5px;
}
JavaScript
var userChoice = prompt("Pick a number between 50 and 100");
for (x=1; x <= userChoice; x++){
if( x % 3 == 0 ){
document.write("<ul><img src='http://dtc-wsuv.org/rgrover14/pingpong/left.png'></ul>")
}
if( x % 5 == 0 ){
document.write("<ul><img src='http://dtc-wsuv.org/rgrover14/pingpong/right.png'></ul>")
}
if( ( x % 3 != 0 ) && ( x % 5 != 0 ) ){
document.write("<div id='ball'><ul>" + x + "</ul></div>")
}
}