I know promises are for async calls, but can we do simple operations in promises. Just for your info like this?
function add(a,b) {return a+b ;}
function addViaPromise() {
return new Promise(resolve, reject) {
resolve(add)
}
}
but why is it always in pending state?