Closed June057 closed 6 years ago
const Promise = require('es6-promise');
return new Promise(function (fulfill, reject) { setTimeout(function () { fulfill('FULFILLED!'); }, 300) }) .then(function(val){ console.log(val); });
I think it’s complaining because you overwrote the “real” Promise constructor with require('es6-promise'). Does it help if you remove the first line?
Promise
require('es6-promise')
Yes Thanks.
const Promise = require('es6-promise');
return new Promise(function (fulfill, reject) { setTimeout(function () { fulfill('FULFILLED!'); }, 300) }) .then(function(val){ console.log(val); });