JavaScript Closure Error Exampel