Promises exercise

Hi, I’m trying to practice promises. However I’m having a little trouble figuring this out:
Write a function resolveWithValue() that has two parameters:

** The first parameter is a function that returns a promise.*
** The second parameter is a string value.*

When called, resolveWithValue() should invoke the function argument with the string argument and then log the resultant promise’s resolve value or reject reason to the console.

Can somebody please help?