Variable Javascript String Functions Length Formula Physics