Today I decided to delve into coding with Google Sheets and JavaScript. As I was working on a project, I encountered a small issue:
function myFunction() {
var sheet = SpreadsheetApp.getActiveSheet();
var data = sheet.getDataRange().getValues();
for (var row = 1; row < data.length; row++) {
If(data[row][0].length <= 0) { //Error Line
Logger.log(data[row][0]);
}
}
}
I'm now getting an error saying that I'm missing a semicolon, but I can't figure out why. Any help on this would be greatly appreciated.