implement Javascript Closure,fix #4