Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
学ぶ Exporting with export and export default | Section
/
Node.js Fundamentals

bookExporting with export and export default

メニューを表示するにはスワイプしてください

Understanding how to export values from a module is essential when working with ES Modules in Node.js. ES Modules use the export and export default keywords to make variables, functions, or classes available to other files.

Named exports allow you to export multiple values from a module by name. Each exported value must be explicitly specified, and when importing, you must use the exact exported names.

In contrast, default exports allow you to export a single value as the main exported entity from a module. When importing a default export, you can use any name you choose for the imported value.

mathUtils.js

mathUtils.js

copy
question mark

Which statements about export and export default in ES Modules are correct?

すべての正しい答えを選択

すべて明確でしたか?

どのように改善できますか?

フィードバックありがとうございます!

セクション 1.  15

AIに質問する

expand

AIに質問する

ChatGPT

何でも質問するか、提案された質問の1つを試してチャットを始めてください

セクション 1.  15
some-alt