Will es6 scripts outside of export be exported?

I import a print.js file in index.js. In this print.js, I also console.log in addition to export.
then print it out and find that there is 2222 in the browser console. Why is this

?
Mar.09,2021

is very simple, when import, the module code that is import will be executed once.


only the value of export will be imported
, but the global code of the imported module will be executed

refer to import


console has its output location, not in your import file output

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3de3b-2c3c2.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3de3b-2c3c2.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?