Currently, I am developing my portfolio and working on a function in JavaScript called translate3d(0,10px,0). My question is, how can I use a variable instead of hardcoding the value 10px? I attempted to use translate3d(0,a,0) where 'a' is a variable with the value of 10px (such as a="10px";), but it did not make any changes to the page and no errors appeared in the console. Thank you in advance for your help.
// This is what the function looks like
function levelBox(){
setTimeout(function (){
e1.style.webkitTransitionDuration = "1s";
e1.style.webkitTransitionTimingFunction = "ease-out";
e1.style.webkitTransform = "translate3d(0, 'a', 0)';
}, 0);
}