Store an empty array in tasks to see that its length is 0.

Make sure to assemble var tasks = []; in your code.