what is difference between import and require

 One of the major differences between require() and import() is that require() can be called from anywhere inside the program whereas import() cannot be called conditionally, it always runs at the beginning of the file. To use the require() statement, a module must be saved with . js extension as opposed to 

No comments:

Post a Comment

Useful VS Code Extensions / Packages

  Name What it does Why helpful for checking commits / trees GitLens Enhances built‑in Git support: inline blame, commit graph, file history...

Best for you