Is it possible to grab the current position of the users scroll bar when they scroll?

Say, if they were scrolled to the very top it would be 0, if they scrolled down it'd change.

Can I assign a variable to contain the current scroll position whenever I access it, or is there a function in JavaScript for this already?

Edit
Report