
Originally Posted by
Tr4ffic
I was wondering if this is correct.
I would like to have a different test every time it does the for(test1,test2,test3..).
This doesn't seem to work.
for(var i=0;i<9;i++){
var test + i = document.creatElement('Button');
}
any help please ????
Whilst it may be possible to perform exactly what you want (it depends on context), consider using an array instead:
Code:
var numButtons = 9,
tests = [];
for (var i = 0; i < numButtons; ++i)
tests[i] = document.createElement('button');
Bookmarks