115
rated 0 times
[
118]
[
3]
/ answers: 1 / hits: 128825
/ 11 Years ago, thu, july 11, 2013, 12:00:00
I met this issue sometimes but still don't know what causes it.
I have this script in the page:
$(function(){
var value = 10;
});
But the browser says ReferenceError: value is not defined. However if I go to the browser console and input either
10
or
var value = 10;
either of them can return 10. What is the problem with my script?
More From » variables