Q:

Is my .then Javascript Promise Working?

Here is a snippet of my code:
.then(functionUpdate(par))
.then(function() {
console.log("why do I see this in my terminal before i see all of the console.log from functionUpdate()?");

I want functionUpdate(par) to finish before going on to the next function but when I look in my terminal the console.log in the next function goes off before all of the console.log within functionUpdate.  I presume this means that the functions are not being called synchronously.  I thought the .then promise was supposed to enforce synchronous operations.  What am I doing wrong?
I've also tried using Parse.Promise (I'm using Parse.com and have it installed) and Q to no avail.  If anything I often get an error saying I can not execute then on undefined.

A:

This is explicitly how promises work: they will run "until they are done" and functions you pass as then handlers will trigger "whenever the promised code yields a result". In the mean time, the rest of your  script that follows the promise chain keeps running as usual.

