Add JS function assigned to variable snippet

Often we want a function assigned to a variable, so I added a snippet for it!

Cheers,
Louis