Saving Input Field Value in a Variable

Hey Guys
I was just wondering how I take the value from an input field and save it in a variable using JS.

you need the .text of the input field.