Is there something in JavaScript similar to @import
in CSS that allows you to include a JavaScript file inside another JavaScript file?
1 Replies
We can include a JavaScript file in another JavaScript file using @import.
Example1.js
export const message = "How you doing?";
next import this Example1.js file in another js file.
Example2.js
import { message } from "./Example1.js";