Mavzu
- Loops
- for loop
- while
- do while
- Functions (Declaration)
SCOPES:
Scopelar 4ta turga bolinadi bular :
1-Global scope
2-Local scope
3-Function scope
4-Block scope
Scope lar quydagicha korinadi :
Global scope β Hamma kodlar yoziladigan joy
Local scope β Functioni orab turgan joy
Function scope β Function ichida joylashgan qismi
Bloce scops β Biron bir shat yozilsa , Masalan: if elese yokiy for
LOOPS:
JavaScript da asosan ishlatiladigan 3ta loop operatorlari mavjud ular .
1-while
2-do while
3-for operatorlari:
While takrorlanuvchi aperator:while ishlashi
Do while while bilan bir hil ishlaydi farqi shartni oxirida tekshiradi: Do whilening ishlashi
cansole
FOR For loop boshqa looplarga qaraganda tez ishlaydi universl loop hisoblanadi va ko'p ishlatiladi:
Forning ishlashi:
cansole
FUNCTION DECLERATION
Fuction declaration => bu fuction asosi pilus fuction yaratib uni hohlagan joyda chaqirsak boladi .
Top comments (0)