I have an excel spreadsheet with a circular reference. By default, Excel will not calculate the cell. However, you can override this default behavior and force it to calculate a cell with a circular reference. You just need to set the number of iterations before it should stop (or use its default 100 iterations).
If I want to reproduce Excel's handling of this situation with JavaScript, can I simply wrap my function in a for loop, iterate a counter, and end the function calls when the counter hits a specified number? Or am I missing something more intricate in what Excel is doing with its iteration limit?
I apologize for the abstract nature of the request. I don't have an exact example at the moment, but could produce one if necessary.