Weird behaviour of itemByRange function
Hi everyone! I wanted to use itemByRange function for applying styles to certain cells of table, but i totally confused of behaviour of this function. Maybe someone can help me understand what i'm doing wrong.
So, i have the following table.

It consits of 5 cells. If i acess them one by one via next expression cells.item(i).contents everything is fine, i can see correct content (for example "test" for index 0, "test2" for index 1, "test3" for index 2). But when i use itemByRange, for example next expression - alert(cells.itemByRange(1,3).contents), i can see next output test2, 2018, test4, 2017, which seems weird for me, because i thought itemByRange returns elements from a sequential collection of cells and i thought it would return something like test2, test3, 2018.
The weirdest thing here is that when i try something like this cells.itemByRange(0,1).contents it returns test, test2 - exactly as i imagined.
I would appreciate any help with understanding the problem)



