Reasons for the inconsistency between JS files running through Node and the script tags of HTML files

Problem Description

  • The output in Node is Undefined
  • The output in HTML is not awesome

the reason

  • In Html this refers to window, but in node this refers to an empty object.

Guess you like

Origin blog.csdn.net/sinat_41696687/article/details/115034907