Modules:
Module help us with encapsulation by exposing from a given file the pieces we want to be access publically. An export statement will be used for that.
export {
show: someFunc()
}
Then an import statement is used to import that piece:
import { show } from './my-file.js'
No comments:
Post a Comment