How do i get the value of the global variable inside a scope . If i have the same name variable present in same scope .
<script>
var number =2;
var fun= function(numbs){
console.log(number);
//here it displays 2
var number =numbs;
console.log(number);
//here it displays 3
console.log(number);
//how do i get value of global variable here
}
fun(3);
</script>
var numbers = numbs;instead!// here it displays 2) actually displaysundefineddue to variable hoisting.