| Сообщение от yintar | 
	| но можете в коде привести хотя б один пример | 
	
Смогу! 
 
 
var lenght;
$('document').ready(function() {
 calculationPriceOnLine(width,lenght,priceKvMetr)
  console.log(lenght ); но здесь получаю undefined
   $('#length').on('keyup', function(){//здесь получаю значение и записываю в переменную lenght.
        lenght = $(this).val();
         // console.log(lenght); выводит значение переменной
    });
   
     function calculationPriceOnLine(width,lenght,priceKvMetr){ //в этой функции и нужна переменная lenght .......
        console.log(lenght ); но здесь тоже получаю undefined
         if(width > 0 && lenght > 0){
            return width * lenght * priceKvMetr;
        }
    }
 });