Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #36397
| Newsgroups | comp.lang.javascript |
|---|---|
| Date | 2019-04-23 23:50 -0700 |
| Message-ID | <5a2b4e29-7d14-4cd3-8759-a77083b987cb@googlegroups.com> (permalink) |
| Subject | Javascript "object creation" and object oriented programming |
| From | jonas.thornvall@gmail.com |
I really feel uncomfortable when it comes to object and their structures, to much multidimensional array programming i guess.
So i have a hard time to grip howto actually make the objects to store data.
Let us say i have a synth object, each synth have bank index and the banks have names, each bank have instrument index and the instruments have names.
Now each instruments have notes with index and the notes have names. Maybe my attempt below is correct but it just feel so wrong? It somehow miss the depth aspect of multidimensional arrays?
function newCollection(m) {
extSynth[m] = {
synth : "",
bank: [],
bankname : "",
prg : [],
prgname :"",
note : [],
notenname : "",
};
return newCollection;
}
Back to comp.lang.javascript | Previous | Next — Next in thread | Find similar | Unroll thread
Javascript "object creation" and object oriented programming jonas.thornvall@gmail.com - 2019-04-23 23:50 -0700
Re: Javascript "object creation" and object oriented programming jonas.thornvall@gmail.com - 2019-04-24 01:02 -0700
Re: Javascript "object creation" and object oriented programming "R.Wieser" <address@not.available> - 2019-04-24 12:34 +0200
Re: Javascript "object creation" and object oriented programming jonas.thornvall@gmail.com - 2019-04-24 05:41 -0700
Re: Javascript "object creation" and object oriented programming "R.Wieser" <address@not.available> - 2019-04-24 18:06 +0200
Re: Javascript "object creation" and object oriented programming jonas.thornvall@gmail.com - 2019-04-24 06:24 -0700
Re: Javascript "object creation" and object oriented programming jonas.thornvall@gmail.com - 2019-04-24 07:00 -0700
Re: Javascript "object creation" and object oriented programming John G Harris <niam@jghnorth.org.uk.invalid> - 2019-04-24 17:39 +0100
Re: Javascript "object creation" and object oriented programming jonas.thornvall@gmail.com - 2019-04-24 11:01 -0700
Re: Javascript "object creation" and object oriented programming John G Harris <niam@jghnorth.org.uk.invalid> - 2019-04-25 18:08 +0100
Re: Javascript "object creation" and object oriented programming jonas.thornvall@gmail.com - 2019-04-25 10:14 -0700
Re: Javascript "object creation" and object oriented programming jonas.thornvall@gmail.com - 2019-04-24 11:11 -0700
Re: Javascript "object creation" and object oriented programming jonas.thornvall@gmail.com - 2019-04-24 13:50 -0700
Re: Javascript "object creation" and object oriented programming jonas.thornvall@gmail.com - 2019-04-25 01:01 -0700
Re: Javascript "object creation" and object oriented programming John G Harris <niam@jghnorth.org.uk.invalid> - 2019-04-25 18:12 +0100
csiph-web