coding with ☕️
2 subscribers
262 photos
14 videos
11 files
165 links
Anwendungsentwicklung
Download Telegram
coding with ☕️ pinned «https://jsbin.com/?html,js,output»
let year = prompt('In which year was the ECMAScript-2015 specification published?', '');

if (year < 2015) {
alert( 'Too early...' );
} else if (year > 2015) {
alert( 'Too late' );
} else {
alert( 'Exactly!' );
}
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!"