javascript sources
1 subscriber
1 photo
1 link
Hello world
Download Telegram
Forwarded from coding with ☕️
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.
Forwarded from coding with ☕️
let hour = 12;
let minute = 30;

if (hour == 12 && minute == 30) {
alert( 'The time is 12:30' );
}
Forwarded from coding with ☕️
let i = 0;
while (i < 3) { // shows 0, then 1, then 2
alert( i );
i++;
}
Forwarded from coding with ☕️
break operatori switch blokini to'xtatadi.
Forwarded from coding with ☕️
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.
Forwarded from coding with ☕️
“arrow functions”
Forwarded from coding with ☕️
let func = (a, b) => a + b;
Forwarded from coding with ☕️
"function expression"
Forwarded from coding with ☕️
let func = function(arg1, arg2, ..., argN) {
return expression;
};
Forwarded from coding with ☕️
Function Declaration (An'anaviy Funksiya)
Forwarded from coding with ☕️
coding with ☕️
Function Declaration (An'anaviy Funksiya)
function sayHello() {
console.log("Hello!");
}
sayHello(); // "Hello!"
Forwarded from coding with ☕️
Function Expression (Ifodaviy Funksiya)
Forwarded from coding with ☕️
coding with ☕️
Function Expression (Ifodaviy Funksiya)
const sayHello = function() {
console.log("Hello!");
};
sayHello(); // "Hello!"
Forwarded from coding with ☕️
Arrow Function (Yoyuvchi Funksiya)
Forwarded from coding with ☕️
coding with ☕️
Arrow Function (Yoyuvchi Funksiya)
const sayHello = () => {
console.log("Hello!");
};
sayHello(); // "Hello!"
Forwarded from coding with ☕️
Qisqa yozuv: {} va return ni olib tashlash mumkin.