I have a promise in a class that looks like this:
someMethod() {
return new Promise(function(resolve) {
resolve(10);
}
}
Below I know that value WILL return 10 but I want to pass it to myvariable so I've done this:
var myvariable = module.someMethod.then(value => {
return value;
});
But it's not passing the value.
How can I do this?