evalなしで実行時にJavascriptでvarをアセンブルするにはどうすればよいですか?
var lc = $('.bezeichnung-1').length;
for (var lt = 1; lt <= lc; lt++) {
eval("var neuerwert"+lt+"=0;"); // this works but I don't want to use it because I read that eval is bad
}
var lc = $('.bezeichnung-1').length;
for (var lt = 1; lt <= lc; lt++) {
window["var neuerwert"+lt] = 0; // this does not work
}