Named Export

noun

say it: “NAYMD EK-sport” /neɪmd ˈɛkspɔːrt/

A value a module shares under its own name, which another file imports by that exact name inside curly braces.

What is Named Export in JavaScript?

Named Export — An exported value imported by its declared export name.

export function total(price, quantity) {
    return price * quantity;
}

In a sentence

  • “toMilliliters is a named export, so main.js brings it in with import { toMilliliters } from "./convert.js".”

Level: Journeyman · More JavaScript terms at this level

Updated