Let's assume that you declare a variable to export later on:
javascriptlet friends = 30; export { friends };
This is equivalent to:
javascriptexport let friends = 30;
Now you can import the variable such as:
javascriptimport { friends } from '../Friends.js'; console.log(friends); // 30
Hi, I'm Erik, an engineer from Barcelona. If you like the post or have any comments, say hi.