Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

JavaScript finally() method

// returns a promise
let countValue = new Promise(function (resolve, reject) {
    // could be resolved or rejected   
    resolve('Promise resolved'); 
});

// add other blocks of code
countValue.finally(
    function greet() {
        console.log('This code is executed.');
    }
);
Source by developer.mozilla.org #
 
PREVIOUS NEXT
Tagged: #JavaScript #method
ADD COMMENT
Topic
Name
6+1 =