Back to tasksGet help with live coding in real time with Sobes Copilot
Junior — Senior
23
Определите, что будет выведено в консоль (пример 6)
Task condition
Нужно понять, какое значение переменной index окажется в выводе консоли.
function get() {
const index = 'cat';
return {
fn1: () => { console.log(index) },
fn2: () => { console.log('Hello_2') }
}
}
const { fn1: a, fn2: b } = get();
console.log(a());