Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
次のように一連のオブジェクトに名前を付ける方法はありますか:
for (i=0; i<numberOfObjectsDesired; i++;) { Object ("thisone"+i); thisone+i = new Object(); }
thisone0、thisone1、thisone2、thisone3、...などはすべてオブジェクトの一意のインスタンスです
確かに、それは配列と呼ばれます:
var thisone = new object[numberOfObjectsDesired]; for (i=0; i<numberOfObjectsDesired; i++;) { Object ("thisone"+i); thisone[i] = new Object(); }
インスタンスを 、 、 ... ではなく 、 などと呼ぶ必要があることに注意thisone[0]してthisone[1]くださいthisone0。thisone1
thisone[0]
thisone[1]
thisone0
thisone1