The syntax is: promise . then ( function ( result ) { /* handle a successful result */ } , function ( error ) { /* handle an error */ } ) ; The first argument of .then is a function that runs when the promise is resolved and receives the result.
adminnewd Answered question September 19, 2024