animation element using javascript code example
Example 1: js add animation to element
document.getElementById('test').style.animation = 'fading 2s infinite'
Example 2: js add animation to element
let rotate360 = [
{ transform: 'rotate(360deg)' }
];