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

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 exist
Import (foo) from ‘/path/FooUtils.js’;
Import (boo) from ‘ /path/NarUtils.js’;
B . const foo = () => { return ‘foo’ ; }
const bar = () => { return ‘bar’ ; }
export { bar, foo }

C . Export default class {
foo() { return ‘foo’ ; }
bar() { return ‘bar’ ; }
}

D . const foo = () => { return ‘foo’;}
const bar = () => {return ‘bar’; }
Export default foo, bar;

Answer: B,C

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments