Difference between importing and requiring? #738
Answered
by
anannyenaik
369-shar-block
asked this question in
Q&A
-
|
Just confused about what's the main difference between importing and requiring. For example, a lot of times we do this: But we also do this: What's the difference? |
Beta Was this translation helpful? Give feedback.
Answered by
anannyenaik
Jul 4, 2022
Replies: 1 comment 3 replies
-
|
We use |
Beta Was this translation helpful? Give feedback.
3 replies
Answer selected by
369-shar-block
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
We use
importfor vanilla JavaScript and derivatives; andrequireis primarily used in Node.js. The use/meaning is the same for both of them though, just different syntax.Hope this helps!