<prompt> Kuandika HTML na JavaScript ambayo huendesha mpira kutoka kushoto hadi kulia na nyuma juu ya katikati ya screen.  <response>: Heres an example that uses HTML5 canvas and JavaScript to create an animated ball that moves from left to right and back across the middle of the screen:Animated BallThe code above creates a canvas element, sets its dimensions to cover the entire screen, and gets the canvas context for drawing. Then it sets the initial position and velocity of the ball and defines an animation loop that clears the canvas, draws the ball, updates its position, and reverses its direction when it reaches the canvas edge. Finally, it starts the animation loop using the requestAnimationFrame method. 