I\'m having trouble understanding the scope of a variable inside promises. Let\'s say I have the following code :
var tab return new Promise(function(resolve,