<script type="text/javascript"> var $ = 6; function my() { var $ = 11; var f = function () { alert($) } f(); }; my(); </script>