'JavaScript syntax highlighting -- is status a keyword? -- what's it used for?
My vim syntax highlighting just lead me to believe that status is a keyword in JavaScript.
Searching around all I can find are articles about window.status in browser JavaScript. Is this the meaning of this 'keyword' status or is there something different going on?
What is the keyword status?
Solution 1:[1]
If you play around in your console. You can do the following:
-> status
<- ""
-> window.status
<- ""
-> status='333'
<- "333"
-> status
<- "333"
-> window.status
<- "333"
This to me indicates that the keyword status is simply an alias for the window.status property. What exactly window.status does I am not sure.
EDIT: After reading the comment below, I realized that properties of the windows object are essentially global. So this makes status the same as window.status and NOT an alias as I mention above.
See this Stack Overflow about the window object: Is window really global in Javascript?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 |
