I use only jQuery for writing JavaScript code. One thing that confuses me is these two approaches of writing functions,
First approach
The first is a function expression assigned to the vote variable, the second is a function declaration.
The main difference is that function statements are evaluated at parse time, they are available before its declaration at runtime.
See also: