![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
What is the deal with initializing a variable like this? var helper = {}, |
|
What are the first curly braces? |
#3
| |||
| |||
|
|
What is the deal with initializing a variable like this? var helper = {}, (...) What are the first curly braces? |
#4
| |||
| |||
|
|
On Jun 28, 6:03 pm, Nick S <nrsut... (AT) gmail (DOT) com> wrote: What is the deal with initializing a variable like this? var helper = {}, (...) What are the first curly braces? It means "helper is an object". |
#5
| |||
| |||
|
|
Nick S <nrsut... (AT) gmail (DOT) com> writes: What is the deal with initializing a variable like this? var helper = {}, This declares the "helper" variable and assigns it a value that is a new object. .. What are the first curly braces? The expression "{}" is an object literal expression that evaluates to a new object with no extra properties. It's equivalent to "new Object()". /L -- Lasse Reichstein Nielsen DHTML Death Colors: <URL:http://www.infimum.dk/HTML/rasterTriangleDOM.html 'Faith without judgement merely degrades the spirit divine.' |
![]() |
| Thread Tools | |
| Display Modes | |
| |