Похожие чаты

When you do var b = “Can I access this?”; function bb()

{
var a = “hello”;
console.log(b);
}

bb()

How is the bb function able connected to the variable b?

12 ответов

15 просмотров

const a = 1; { const b = 2; { const c = 3; { const d = 4; // I have access to: a, b, c, d } // I have access to: a, b, c } // I have access to: a, b } // I have access to: a

Charlemagne-Holdt Автор вопроса
Thomas
const a = 1; { const b = 2; { const c = 3;...

So scope is something similar to conceptual classification?

Charlemagne Holdt
So scope is something similar to conceptual classi...

Try learning java you will learn these things better thn anything 😂

Charlemagne-Holdt Автор вопроса
eh
Try learning java you will learn these things bett...

No way, I’m going to stop learning programming other than JavaScript and Python. A traditionally more complex maths like linear algebra is way easier than understanding and getting into programming language. ;(

Charlemagne-Holdt Автор вопроса
eh
Try learning java you will learn these things bett...

Espeically writing new functions are hell of headache and naming for the function and objects…

Charlemagne-Holdt Автор вопроса
Thomas
const a = 1; { const b = 2; { const c = 3;...

So this is about closures right? My instructor is defining what closures is - a function ran. the function executed. It’s never going to execute again. But it’s going to remember that there are references to those variables so the child scope always has access to the parent scope.

Charlemagne-Holdt Автор вопроса
Thomas
const a = 1; { const b = 2; { const c = 3;...

Closures - A function ran. The function executed. It’s never going to execute again. But it’s going to remember that there are references to those variables so the child scope always has access to the parent scope.

Thomas
const a = 1; { const b = 2; { const c = 3;...

that block scoping, wow, we don't even need functions to achieve closures

Thomas
Well this isn't actually closures

but yeah, it has access to the higher scope

Charlemagne-Holdt Автор вопроса
Thomas
const a = 1; { const b = 2; { const c = 3;...

Apart from closures and currying, it looks like JavaScript has literally imported the mathematical concept, functional composition also just called Compose in JavaScript.

Похожие вопросы

Обсуждают сегодня

Господа, а что сейчас вообще с рынком труда на делфи происходит? Какова ситуация?
Rꙮman Yankꙮvsky
29
А вообще, что может смущать в самой Julia - бы сказал, что нет единого стандартного подхода по многим моментам, поэтому многое выглядит как "хаки" и произвол. Короче говоря, с...
Viktor G.
2
@Benzenoid can you tell me the easiest, and safest way to bu.y HEX now?
Živa Žena
20
This is a question from my wife who make a fortune with memes 😂😂 About the Migration and Tokens: 1. How will the old tokens be migrated to the new $LGCYX network? What is th...
🍿 °anton°
2
30500 за редактор? )
Владимир
47
а через ESC-код ?
Alexey Kulakov
29
What is the Dex situation? Agora team started with the Pnetwork for their dex which helped them both with integration. It’s completed but as you can see from the Pnetwork ann...
Ben
1
Гайс, вопрос для разносторонее развитых: читаю стрим с юарта, нада выделять с него фреймы с определенной структурой, если ли чо готовое, или долбаться с ринг буффером? нада у...
Vitaly
9
Anyone knows where there are some instructions or discort about failed bridge transactions ?
Jochem
21
@lozuk how do I get my phex copies of my ehex from a atomic wallet, to move to my rabby?
Justfrontin 👀
11
Карта сайта