var DynamicModelView = {
createModelView: function (obj,vitalslength,headerValue) {
for(vitalsCount = 0, vitalsLen = vitalslength; vitalsCount < vitalsLen; vitalsCount++) {
// Business logic... with obj and headerValue
}
I need to call this function again.
When i call `this.createModelView(arguements)` it keeps on executing...
}
}
I need execute the function based on the count… the for loop executes perfectly based on the count, but the function executes only once.
There are a couple of ways to handle recursive looping (anyone else remember SICP here? Ah… blessed Scheme).
More realistically (and faster), you may want to simply put a while loop inside the function:
If you want to make sure that the function only runs x times, then you could do this:
Hopefully that can get you started.