About 936,000 results
Open links in new tab
  1. JavaScript Modules - W3Schools

    You can import modules into a file in two ways, based on if they are named exports or default exports. Named exports are constructed using curly braces. Default exports are not.

  2. Export and Import - The Modern JavaScript Tutorial

    Jan 18, 2023 · Importing the default export: import x from "module" import {default as x} from "module" Import all: import * as obj from "module" Import the module (its code runs), but do not …

  3. export - JavaScript | MDN - MDN Web Docs

    4 days ago · The export declaration is used to export values from a JavaScript module. Exported values can then be imported into other programs with the import declaration or dynamic import.

  4. javascript - Module.exports and es6 Import - Stack Overflow

    Dec 15, 2015 · Since you want to import that same function, the way to import is using the default import (import tiger from './tiger'). Otherwise, if you want to use named import (import { tiger } …

  5. JavaScript Importing and Exporting Modules - GeeksforGeeks

    Dec 15, 2022 · JavaScript modules allow you to organize code into separate files, making it easier to maintain and reuse. To share code between modules, JavaScript provides two types of …

  6. JavaScript Modules – How to Create, Import, and Export a Module in JS

    Feb 28, 2023 · This article has covered the basics of defining, exporting, and importing modules in JavaScript, including default exports, named exports, renaming exports, and importing entire …

  7. Understanding Modules and Import and Export Statements in JavaScript

    Aug 28, 2021 · The ECMAScript 2015 specification introduced modules to the JavaScript language, which allowed for the use of import and export statements. In this tutorial, you will …

  8. JavaScript Export

    Summary: In this tutorial, you will learn how to use the JavaScript export keyword to export values from a module. ES6 modules allow you to structure JavaScript code in a modular fashion. …

  9. JavaScript: Export and Import Essentials - W3docs

    JavaScript provides several methods to export functions, objects, or primitive values from a module. Each method serves different needs and use cases. Named exports allow multiple …

  10. How to Create, Import, and Export a Module in JS - Expertbeacon

    Aug 30, 2024 · Exporting functionality declares what a module publicly exposes to other parts of an app. Think of this as the public interface of your module. Some ways to export modules: …

Refresh