using global variables
-
Monjurul Habib wrote:
local function variables, if you declare them explicitly with the var keyword.
Then they wouldn't be global now would they?
I know the language. I've read a book. - _Madmatt
OK, sir; ..., Shall you forgive him ?!!
Help people,so poeple can help you.
-
Global variables have slow performance because they live in a highly-populated namespace. Not only are they stored along with many other user-defined quantities and JavaScript variables, the browser must also distinguish between global variables and properties of objects that are in the current context. The down side is this convenience slows down code that uses global variables. Sometimes global variables also have higher performance, like local function variables, if you declare them explicitly with the var keyword. An example is var d = document, instead of d = document, but it's not reliable. Mysterious behavior that works sometimes but not always is a danger sign, and I feel more comfortable using local function variables. More detail on Performance Optimizations for High Speed JavaScript
Good Answer, Monjurul. 100 :rose: ;)
Help people,so poeple can help you.
-
Monjurul Habib wrote:
local function variables, if you declare them explicitly with the var keyword.
Then they wouldn't be global now would they?
I know the language. I've read a book. - _Madmatt
I think you will find your answer in the link..:thumbsup:
-
I think you will find your answer in the link..:thumbsup:
I didn't have a question. I do know though, do you know the difference between the meaning of local and global?
I know the language. I've read a book. - _Madmatt
-
I didn't have a question. I do know though, do you know the difference between the meaning of local and global?
I know the language. I've read a book. - _Madmatt
Sir, I am not a learned person like you. Can you please provide a link where you dump all of your knowledge specially on Javascript?? Thanks in advance.:thumbsup::thumbsup:
-
Good Answer, Monjurul. 100 :rose: ;)
Help people,so poeple can help you.
Thanx :)
-
Sir, I am not a learned person like you. Can you please provide a link where you dump all of your knowledge specially on Javascript?? Thanks in advance.:thumbsup::thumbsup:
-
great link. ;) and may b you forgot to share this link
modified on Saturday, March 5, 2011 6:11 PM
-
OK, sir; ..., Shall you forgive him ?!!
Help people,so poeple can help you.
I really like your comment "Help people,so poeple can help you."
-
I really like your comment "Help people,so poeple can help you."
over my head, sir.:thumbsup:
Help people,so poeple can help you.
-
great link. ;) and may b you forgot to share this link
modified on Saturday, March 5, 2011 6:11 PM
Stop it, the pair of you. There is no excuse for this form of behaviour in the forums. Please refrain from these attacks - they are not clever.
I'm not a stalker, I just know things. Oh by the way, you're out of milk.
Forgive your enemies - it messes with their heads
-
Stop it, the pair of you. There is no excuse for this form of behaviour in the forums. Please refrain from these attacks - they are not clever.
I'm not a stalker, I just know things. Oh by the way, you're out of milk.
Forgive your enemies - it messes with their heads
apologize
-
apologize
over my head, Sir
Help people,so poeple can help you.