← Quiz: Classes, Modules, Map and Set: all 10 questions
Quiz: Classes, Modules, Map and Set · Question 7 of 10
Which import matches export default function formatRupees() {} in price.js?
Which import matches export default function formatRupees() {} in price.js?
- A.import { formatRupees } from "./price.js"
- B.import formatRupees from "./price.js"
- C.require formatRupees from "./price.js"
- D.import default from "./price.js"
Answer & explanation
Correct answer: import formatRupees from "./price.js"
A default export is imported without braces, under any name you choose.
Can you get the rest right without peeking?
Take the timed Quiz: Classes, Modules, Map and Set quiz free. Pass it to earn XP and count towards your certificate.
Start the quiz →