then method. The then method is executed immediately after your promise is fulfilled with resolve. Here’s an example:
```js
myPromise.then(result => {
// do something with the result.
});
```
result comes from the argument given to the resolve method.
then method to your promise. Use result as the parameter of its callback function and log result to the console.
then method on the promise.
testString: assert(codeWithoutSpaces.match(/(makeServerRequest|\))\.then\(/g));
- text: Your then method should have a callback function with result as its parameter.
testString: assert(resultIsParameter);
- text: You should log result to the console.
testString: assert(resultIsParameter && codeWithoutSpaces.match(/\.then\(.*?result.*?console.log\(result\).*?\)/));
```