We're a place where coders share, stay up-to-date and grow their careers.
This is what I got.
let animate = (el, milliseconds, distance) => { let element = document.getElementById(el); element.setAttribute( "style", `transform:translateX(${distance}px); transition-duration: ${milliseconds}ms;` ); }; animate("para", 2000, 500);```
This is what I got.