What is the role of window.Promise = Promise; in `main.js`?

excuse me, what is the purpose of the lines of code in main.js ?

if (!window.Promise) {
  window.Promise = Promise;
}
What is the purpose of

and Promise on window? What is the general use environment?

Feb.28,2021

means that if there is no Promise, on window, assign it a Promise


to see if there is no Promise, in your window scope, then save it to window scope with the Promise you introduced.

Menu