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
Should a 568A to 568B Patch Panel run be changed?
LNK2019: unresolved external symbol
Open Office Text and python: extract text word by word
How can I view a Private IP Address Nat to a Public IP Address
Developer access to CUD
SBS2003 - Mapping Network Drives via VBS
Excel Emailing Worksheet
how to create a create script for a new login
How to add pictures to a listview control.
virtual machin backup