我在这样的函数中有一个 for 语句:
for(i=0;i<=nc;i++){
var nd = //how many times this for statement has run+1
//if the for statement runs for the first time nd would be 1, second time nd would be 2, the for statement will run a total of "nc" times
this.id=nd }
我将如何做到这一点?