How is forEachRow used?

Dear community,
does anyone have an example of forEachRow?
This seems like an interesting line of code, but i can’t figure out how to use it.
docs.dhtmlx.com/api__dhtmlxgrid_foreachrow.html

Cheers!

myGrid.load(url,function(){ // after the dta is loaded completely
myGrid.forEachRow(function(id){ //you may iterate through all the rows
myGrid.cellById(id,0).setValue(“new Value”) // to do smth with each row
});
});