Microsoft
Software
Hardware
Network
Question : Create array based on variable value with javascript
Hi,
I have a variable with a dynamic value (from 1 to 15). Depeding on what value the variable have I want to create an array with the same lenght and if for example the variable value is 1 I want to store A in the array, if the value is 6 I want to store A,B,C,D,E,F in the array and so on. How do I achieve this?
Thanks in advance.
Answer : Create array based on variable value with javascript
var x = 5;
var _array=[];
for(var i=1;i<=x;i++) {
_array.push(String.fromCha
rCode(64+i
));
}
alert(_array);
Random Solutions
Connecting from remote
how do I count the number of rows in my db
asp.net google maps
Performance issue when inserting into temporary # table
Windows XP Home Edition Version 2002 / SP 3
Warning: mysql_select_db(): supplied argument is not a valid MySQL-Link resource
Regular Expressions Perl
Best PC TV Channels or Web Sites
Script to monitor the logged in user. If a different person found then email.
I just connected my server to my router but my client machine does not connect to it.