javascript – What's the meaning "Typeerror can not read the property" 0 "undefined"?

var previousDataRange = ss2.getRange (5,1, lastRow, 8);

previousDataRange.clear ();

var data = ss.getRange (3.1, lastRow-1.8) .getValues ​​();

var currentRow = ss2.getLastRow () + 1;

for (var a = 0; a <= data.length; a ++) {

for (var b = 0; b <= 7; b ++) {// 8 columns

var cellValue = data[a][b]; // I have the error "typeerror can not read the property" 0 undefined "here

ss2.getRange (currentRow, b + 1) .setValue (cellValue);
}
currentRow = currentRow + 1;
}