Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSS

Promise.resolve

var original = Promise.resolve(33);
original.then( val => console.log('origianl', val);
var cast = Promise.resolve(original);
cast.then(function(value) {
  console.log('value: ' + value);
});
console.log('original === cast ? ' + (original === cast));

// logs, in order:
// original === cast ? true
// value: 33
Source by developer.mozilla.org #
 
PREVIOUS NEXT
Tagged:
ADD COMMENT
Topic
Name
3+9 =