An example of js promise.