473,503 Members | 7,823 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

What does this means....

I saw a declaration like below and wonder what it means. Can someone
please explain to me? Thanks a million.

var doggy = {};

Regards,
Damon

May 2 '06 #1
5 1478
Damon Chong wrote:
I saw a declaration like below and wonder what it means. Can someone
please explain to me? Thanks a million.

var doggy = {};


It is an object initialiser and is equivalent to:

var doggy = new Object();

--
Rob
May 2 '06 #2
Any difference between this and if I initialize like below?

var doggy = [];

Cheers!

May 2 '06 #3
Damon Chong wrote:
Any difference between this and if I initialize like below?
Between 'this' and what? Oh, you mean:

var doggy = {};

var doggy = [];


Yes, that will create an Array object, not an Object object.
--
Rob
May 2 '06 #4
Damon Chong wrote:
Any difference between this and if I initialize like below?

var doggy = [];

Cheers!


It helps if you quote context from the message to which you are replying.

Yes, there is a difference. Restoring your missing context:
var doggy = {};


It is an object initialiser and is equivalent to:

var doggy = new Object();

Any difference between this and if I initialize like below?

var doggy = [];


That one is equivalent to:

var doggy = new Array();

May 2 '06 #5
Oh...thank you and have a good day!

May 2 '06 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

125
14538
by: Sarah Tanembaum | last post by:
Beside its an opensource and supported by community, what's the fundamental differences between PostgreSQL and those high-price commercial database (and some are bloated such as Oracle) from...
51
4451
by: jacob navia | last post by:
I would like to add at the beginning of the C tutorial I am writing a short blurb about what "types" are. I came up with the following text. Please can you comment? Did I miss something? Is...
17
3464
by: Anoob | last post by:
Can we consider () unary operator when calling a function, in exps eq. f(), ( 1 + 2). But when we call function f( 10 ) it is a binary operator. Even if we pass f( 10, 20) as we are using ,...
3
11945
by: ArtPedUK | last post by:
I'm new on C# and I would like to know what it means and if it is necessary. decimal balances = new decimal; decimal ttl = 0m; What does 0m, means is necessary for the programman that "m",...
13
4997
by: Jason Huang | last post by:
Hi, Would someone explain the following coding more detail for me? What's the ( ) for? CurrentText = (TextBox)e.Item.Cells.Controls; Thanks. Jason
4
3052
by: **Developer** | last post by:
Using Shell32.FolderItem's IsBrowsable I find, for example, that Internet Explorer and Printers and Faxes are browsable. I studied Help to find the definition of Browsable but could not find it....
4
3293
by: Ryan Liu | last post by:
TcpClient has a method called GetworkStream GetStream(); So in other words, there is only one stream associate with it for input and output, right? So while it is receiving, it can not send, and...
669
25390
by: Xah Lee | last post by:
in March, i posted a essay “What is Expressiveness in a Computer Language”, archived at: http://xahlee.org/perl-python/what_is_expresiveness.html I was informed then that there is a academic...
10
2082
by: Franky | last post by:
I think I misread a post and understood that if I do: System.Windows.Forms.Cursor.Current = Cursors.WaitCursor there is no need to reset the cursor to Default. So I made all the reset...
5
1571
by: thermate | last post by:
Dr.Bricmont, We are extremely proud of you for your brilliant analysis and courage to come out and say it. Your article brings out not one but several key concepts, worth close reading. The...
0
7193
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7067
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
5562
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development projectplanning, coding, testing,...
1
4992
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4666
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3160
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1495
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
728
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
371
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.