<script type="text/javascript"> var g = false; if (g) { var g = true; } function k(){ return false }; if (k()) { function k(){ return true }; } alert(g); alert(k()); </script>
运行结果:chrome下 false,true
firefox下false,false