I am trying to create a to do list spreadsheet. In one column, `"Daily Tasks"`, I have a list of tasks. In the other column, I have checkboxes. My goal is to create a script that will add all of the "checked" tasks to an array.

I am attempting to do this in my script using a nested for loop. However, when I log my new array that should contain the checked items (trueArr), I see just a series of what appear to be empty arrays.

How do I change my script so that my array contains the checked items from my spreadsheet?

[Here is a link to my spreadsheet](https://docs.google.com/spreadsheets/d/13upysp3_GD5sGwwdegHpJQuZC4gE2pVIGgf-ngu39sM/edit#gid=0)

Here is my code:

```js
//spreadsheet 
var ss = SpreadsheetApp.getActiveSpreadsheet();

//worksheet 
var todoList = ss.getSheetByName("To-Do List");

function completedArray(){
var tasks = todoList.getRange("c6:d22").getValues();
var checks = todoList.getRange("b6:b22").getValues();

var trueArr = [];

for(var i =0; i <tasks.length; i++){
  for(var j=0; j<checks.length;j++){
    if(checks[j]===true){
      trueArr.push(tasks[j]) 
            }  
        }
    Logger.log(trueArr);
    }
}
```

In my log, I expect to see the same items that are on my "Daily Tasks" list on my spreadsheet, but instead I only see empty arrays.