Hackforge Academy

Category: javascript

ES6 Modules JavaScript

Published on 16 Jul 2026

Explanation

ES6 Modules organize JavaScript code into separate files.

Code:

export const name = 'John';

Explanation

Named exports allow multiple values to be exported.

Code:

export function greet(){}

Explanation

Import named exports using curly braces.

Code:

import { greet } from './app.js';

Explanation

Default exports export a single value.

Code:

export default function App(){}

Explanation

Import default exports without curly braces.

Code:

import App from './App.js';

๐Ÿš€ Learn Spring Boot with real-world projects

๐Ÿ’ก Build REST APIs step by step

๐Ÿง  Improve backend development skills

๐ŸŽฏ Get career-ready practical training

Join Our Free WhatsApp Community

Direct access to niche-specific mentors and peers on WhatsApp.

๐Ÿ

Python Community

Discuss Django, FastAPI, AI integration, and automation scripts with 15k+ developers.

Join Python Community
โš›๏ธ

React Community

Master Next.js, Framer Motion, and State Management. Share your latest UI components.

Join React Community
โ˜•

Java Community

Deep dives into Spring Boot, Microservices architecture, and high-performance backend ops.

Join Java Community