Basic JavaScript Question

I am now okay defining new variables within cs_cart and then using them in a modded template with the format {$lang.my_language_variable}

I am ignorant when it comes to javascript but a friend has done something for me and we used fixed language entries rather than variables when making the change.

Is it easy to change these to language variables which are then defined in cs-cart as before and which the javascript will then pick up - or is it far more complicated than that.