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
Syncronize Physical Machine with Virtual Machine
show me everything after the dot in excel
Scan network for service and remove it
SQL SERVER 2005 CANNOT GENERATE SSPI CONTEXT
how to remote wipe iPad from Exchaneg 2007 server?
How do I prevent Navigation Pane from expanding when I activate a command button?
Simple File Sharing Question
HP 1505N cannot change static IP
I just used System Restore to restore the Windows XP OS on my Dell D830 laptop to an earlier point in time; now the network card drivers are disabled & can't be reloaded
Downgrade 2008 R2 TO R1 OEM