This video demonstrates the answers to the following questions.
File: test.html
****************
script src = "one.js" type = "module
File: one.js
*************
import * as foo from "./foo.js";
import * as two from "./two.js";
File: two.js
*************
import * as foo from "./foo.js";
File: foo.js
**************
export let cpuIntensiveOperation = function doSomethingCPUIntensive() { };
In a situation like the one above:
1. Does the module foo.js get loaded in the RAM more than once?
2. Does its code execute every time it is imported by another module?
3. In what sequence does the code of each of the modules execute?
------
The bhajan at the end of this video is named "Ghoonghat ke pat khol re, toko peev milenge." It is a writing of the great Indian mystic and saint Kabir who was born in the 15th century. It is sung by Prahlad Singh Tipaniya, who has sung many of Kabir's writings.
The original video may be found at the URL: • Video
-------
If you want to learn to program a computer, or you wish to get your software development team trained, please visit https://sathyaish.net/?cmp=yt&v=fI9TE... to hire me to conduct the training.
To hire me for remote software development work, please visit https://sathyaish.net/?cmp=yt&v=fI9TE...