I have a list of string variables and I want to assign all of these to an array, but the list is to much, is there any possible for me to using for loop to assign it.
var class_1 = "some description..";
var class_2 = "some description..";
var class_3 = "some description..";
var class_4 = "some description..";
var class_5 = "some description..";
.
.
var class_100 = "some description..";
var classes = [];
for(var i = 0; i < 100; i++){
//loop string variables to array
}
I think it is not possible for me to assign 100 variables manually to the array. Anyone know any technique? Thank you.
[UPDATE] It requires in SystemVerilog syntax, since I not familiar in that language, so I present the idea in Javascript.