passing data around with jquery?

passing data around with jquery?

 I have a question regarding variables. Im new to jquery and ive found myself passing data from one input to another hidden input on a form. Is their a way to store variables and then use them later on rather than passing them in this manner?

Seems a waste to me..

Ian