Why hideRows takes a count, not an end-row
The signature is hideRows(rowIndex, numRows) — both arguments are 1-based, and the second is a count, not a stop index. So hiding rows 5 through 9 is hideRows(5, 5), not hideRows(5, 9). The first time I hit this I passed the loop's end index and got a range error I spent ten minutes blaming on off-by-one arithmetic before reading the signature again.
The same count-not-end pattern applies to showRows, hideColumns, and showColumns. Consistent once you know it; silently wrong until you do.