Last active
June 13, 2020 18:01
-
-
Save rajat2502/07c9c0d51981d4a6ddc05654cb8ca7c4 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 1. Import one or more named exports from the module | |
// Syntax | |
import { <named_export_value> } from '<path_of_module_from_current_module>'; | |
// path can be relative or absolute depending upon the configuration of the project | |
// For Example: | |
import { users, tasks } from './export.js'; | |
// This will import the users and tasks arrays into the current module | |
// 2. Import default | |
// Syntax | |
import <default_export_value> from '<path_of_module_from_current_module>'; | |
// path can be relative or absolute depending upomn the configuration of the project | |
// For Example: | |
import logUser from './export.js'; | |
// This will import the function logUser into this module |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment