My code is currently as follows. I'm using the Parse.Js library.
while (i < workout) {
return q.find({
success: function (type) {
if (type == 3) {
typeCount++;
}
}
});
i++;
}
The problem is the 'return' seems to stop the rest of the function from working. Is there a way to do this without breaking the loop?
I tried removing the return all together but then the q.find code doesn't run.