[JavaScript] Note about how declaring functions affects scope.

resolves #449