I don't understand why the first setTimeout function works but the second one doesn't. The first one is commented out when I run the second setTimeout. But instead of resolving after 3 seconds it resolves immediately.
I'm new to the whole 'promise' thing and the tutorial I'm working through uses promises with setTimeout a lot.
let promise = new Promise( ( resolve, reject ) => {
/* why does setTimeout work with this one... */
setTimeout( () => resolve( 'Job\'s done!!!' ), 3000 );
/* but not with this one */
setTimeout( resolve('done'), 3000 );
} );
promise.then(
result => alert( result )
);