Update function.js

Roman's style corrections
Merge pull request #5 from chirikov/patch-1

Update function.js