Hi to all,
I have this problem in declaring a two-dimesional
array, how will i declare such array with unknown number of rows?
Your help will be very much appreciated. Thanks in advance.
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it! 5 10404
ms_chika said: Hi to all, I have this problem in declaring a two-dimesional array, how will i declare such array with unknown number of rows?
Your help will be very much appreciated. Thanks in advance.
Javascript doesn't support two-dimensional arrays, but on the other
hand, you don't need to declare the number of elements in an array,
either.
var myArray=new Array();
myArray[237]=new Array();
myArray[237][12]="Hello, world!";
oh i see, how about this one ,another question. I have 3
two-dimensional array, i want to merge these 3 arrays so that it will
become only 1 two-dimensional array. Is it possible? If it is, how will
i dot that?
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
ms_chika wrote: oh i see, how about this one ,another question. I have 3 two-dimensional array, i want to merge these 3 arrays so that it will become only 1 two-dimensional array. Is it possible? If it is, how will i dot that?
Have you tried something like:
j=target_array.length;
for (var i=0; i<source_array.length; i++) {
target_array[j] = source_array[i];
j++;
}
?
HTH
Markus
ms_chika wrote: Hi to all, I have this problem in declaring a two-dimesional array, how will i declare such array with unknown number of rows?
Your help will be very much appreciated. Thanks in advance.
var prem=
[["Arsenal",12,3,2],["Chelsea",12,5,0],["Fulham",6,6,6],["Tottenham",4,4,8]];
prem[1][0] =="Chelsea" //true
Mick
Thanks a lot, i got it. =)
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it! This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Stefanie |
last post by:
Hi,
I have a question about declaring variables for writing data to a file for
random access.
I have two string variables declared in a module (user-defined types).
The point is that for one of...
|
by: Maarten Terlingen |
last post by:
Sample:
ClassA: ClassB
ClassB: ClassC
ClassA x = new Class C
I want to know the declaring type of C.
x.GetType() returns C
x.GetType().BaseType returns B
x.GetType().BaseType.BaseType...
|
by: Ole Hanson |
last post by:
I am accessing my database through an interface, to allow future
substitution of the physical datastore - hence I would like to declare in my
Interface that my DAL-objects implementing the...
|
by: param |
last post by:
Declaring struct as static is creating problem with newer version of CC
compiler 5.7 in solaris.
e.g.
static struct new_str {
int a;
int b;
};
|
by: jbeteta |
last post by:
Hello,
I have a problem declaring variables. I need to create an object oRpte
as ReportClass on WebForm1.aspx and be able to use its value on
WebForm2.aspx.
For declaring the property oRpte()...
|
by: Daniel Rudy |
last post by:
Hello Group,
Consider the following code:
/* form 1 */
int main(void)
{
int i;
char *p;
|
by: Jim Michaels |
last post by:
friend fraction& operator+=(const fraction& rhs);
fraction.h(64) Error: error: 'fraction& operator+=(const fraction&)'
must take exactly two arguments
I practically pulled this out of a C++...
|
by: SM |
last post by:
I've always wonder if there is diference when declaring and
initializing a varible inside/outside a loop.
What's a better practice?
Declaring and initializing variables inside a loop routine,...
|
by: =?Utf-8?B?UHVjY2E=?= |
last post by:
Hi, I'm using vs2005, .net 2, C# for Windows application. I use DllImport so
I can call up a function written in C++ as unmanaged code and compiled as a
dll us vs2005. My application is able to...
|
by: Markus Pitha |
last post by:
Hello,
I have a class "Menu". In this class I declare an object "Controller".
Now I have a problem:
Controller uses a ctor but I get the value I have to pass later in my
program.
The only way...
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
| |