【JavaScript】オブジェクトの動的追加

何かハマったのでメモ。

var testObj = new Object();
for(var i = 0; i < 5; i++){
    testObj[i] = 'testData';
}