I use only jquery for writing javascript, one thing that confuses me is these two approaches of writing functions,
1st approach
vote = function (action,feedbackId,responseDiv)
{
alert('hi');
return feedbackId;
}
2nd approach
function vote(action, feedbackId,responseDiv)
{
alert('hi');
return feedbackId;
}
Can anyone guide me what is the difference between the two and why one should use first approach or second approach ?
Thanks