ExamGecko
Question list
Search
Search

List of questions

Search

Related questions











Question 87 - Certified JavaScript Developer I discussion

Report
Export

Refer to the following code that imports a module named utils:

import (foo, bar) from '/path/Utils.js';

foo() ;

bar() ;

Which two implementations of Utils.js export foo and bar such that the code above runs without error?

Choose 2 answers

A.
// FooUtils.js and BarUtils.js existImport (foo) from '/path/FooUtils.js';Import (boo) from ' /path/NarUtils.js';
Answers
A.
// FooUtils.js and BarUtils.js existImport (foo) from '/path/FooUtils.js';Import (boo) from ' /path/NarUtils.js';
B.
const foo = () => { return 'foo' ; }const bar = () => { return 'bar' ; }export { bar, foo }
Answers
B.
const foo = () => { return 'foo' ; }const bar = () => { return 'bar' ; }export { bar, foo }
C.
Export default class {foo() { return 'foo' ; }bar() { return 'bar' ; }}
Answers
C.
Export default class {foo() { return 'foo' ; }bar() { return 'bar' ; }}
D.
const foo = () => { return 'foo';}const bar = () => {return 'bar'; }Export default foo, bar;
Answers
D.
const foo = () => { return 'foo';}const bar = () => {return 'bar'; }Export default foo, bar;
Suggested answer: B, C
asked 23/09/2024
Devon Marsham
29 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first