---
title: "Discussion on \"JavaScript Modules: Import and Export Explained\" | Hashnode"
description: "Discussion on \"JavaScript Modules: Import and Export Explained\". Why modules are needed\nIn the beginning, all your JavaScript code usually lives in one giant file. As your project grows, that file becomes a bit of a mess—often called \"spaghetti code\" by our coding"
url: "https://hashnode.com/posts/javascript-modules-import-and-export-explained/69de506f345b86c2e050bab8"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [JavaScript Modules: Import and Export Explained](https://js-blogs-aarav.hashnode.dev/javascript-modules-import-and-export-explained?utm_source=hashnode&utm_medium=feed)

Why modules are needed In the beginning, all your JavaScript code usually lives in one giant file. As your project grows, that file becomes a bit of a mess—often called "spaghetti code" by our coding

Apr 14 · 3 min read · js-blogs-aarav.hashnode.dev  
Updated Apr 18  
Read the article

-   [#javascript-modules](https://hashnode.com/tag/javascript-modules)
-   [#export](https://hashnode.com/tag/export)
-   [#import](https://hashnode.com/tag/import)

## Written by

[Aarav Ahuja](https://hashnode.com/@Aarav-Ahuja-9)

@Aarav-Ahuja-9

  
[View profile](https://hashnode.com/@Aarav-Ahuja-9)

I write code that looks and does the job

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
