DEV Community

Discussion on: A JavaScript interview question asked at Facebook

 
richardeschloss profile image
Richard Schloss

And, just a helpful link: Passing Parameters to CSS animation if anyone is interested... this would be the CSS way of doing it. JS events fire (like "scrolling", "mousemove") and the data from those events get passed to the css vars (but maybe someday we'd find it easier to pass an argument to a method in JS instead? easier to test maybe?). I think the webanimations API will surprise us all in [1-2 years?] and challenge us all as to what we do in JS vs CSS. I could be wrong. I'm still thinking about the pros and cons.