a very good example to show the privileged function in javascript
and also show the closure