To import a default export, use import ______ from 'module-name';.
- defaultImport
- importDefault
- importDefaultExport
- importDefaultModule
In ES6, when importing a default export from a module, you use the syntax import name from 'module-name';. The keyword default is not used, making option b) importDefault the correct choice.
Loading...
Related Quiz
- Can a higher-order function return another function as its output?
- When exporting a class or function as a default export, it's not necessary to use the ________ keyword.
- Consider a scenario where a module is exporting multiple functions, but only some are used. How does tree shaking impact this scenario?
- What is a static method in an ES6 class?
- Can a static method in a parent class be overridden in a child class?