Wait for Promise to resolve

Here we have a variable called data with an initial value of 5. The Promise uses setTimeout to change the value of data asynchronously. Then we use the multiply function to perform a math operation on the value of data.
However, at the moment we only call multiply with the initial value of data. Adjust the code so that we call multiply only when the Promise has been resolved.
Get a premium membership to access this content: