Update README.md

always define your variables at the top. defining them elsewhere is confusing because of hoisting. there is no block scope in javascript.
Merge pull request #99 from ultimatedelman/master

[functions] define var in example at the top