move variables in js