coding with ☕️
2 subscribers
262 photos
14 videos
11 files
165 links
Anwendungsentwicklung
Download Telegram
Forwarded from Sammi
Media is too big
VIEW IN TELEGRAM
Samarali dars qilish
There are four logical operators in JavaScript: || (OR), && (AND), ! (NOT), ?? (Nullish Coalescing). Here we cover the first three, the ?? operator is in the next article.
let hour = 12;
let minute = 30;

if (hour == 12 && minute == 30) {
alert( 'The time is 12:30' );
}
let i = 0;
while (i < 3) { // shows 0, then 1, then 2
alert( i );
i++;
}
break operatori switch blokini to'xtatadi.
switch berilgan qiymatni case lar bilan taqqoslaydi.
case lar qatorma-qator tekshiriladi va mos kelgan birinchi case bajariladi.
break operatori switch blokini to'xtatadi.
Agar hech qaysi case mos kelmasa, default bajariladi.
“arrow functions”
let func = (a, b) => a + b;
"function expression"
let func = function(arg1, arg2, ..., argN) {
return expression;
};
Function Declaration (An'anaviy Funksiya)
coding with ☕️
Function Declaration (An'anaviy Funksiya)
function sayHello() {
console.log("Hello!");
}
sayHello(); // "Hello!"
Function Expression (Ifodaviy Funksiya)
coding with ☕️
Function Expression (Ifodaviy Funksiya)
const sayHello = function() {
console.log("Hello!");
};
sayHello(); // "Hello!"
Arrow Function (Yoyuvchi Funksiya)
coding with ☕️
Arrow Function (Yoyuvchi Funksiya)
const sayHello = () => {
console.log("Hello!");
};
sayHello(); // "Hello!"