I found some code snippet that has the same behavior, But the different syntax of resolving a promise from a function :
return new Promise(resolve => resolve(fruits[name]))
and
return Promise.resolve(fruits[name])
What is the difference between both?