coding with ☕️
2 subscribers
262 photos
14 videos
11 files
165 links
Anwendungsentwicklung
Download Telegram
let age = prompt('How old are you?', 100);

alert(`You are ${age} years old!`); // You are 100 years old!
The function confirm shows a modal window with a question and two buttons: OK and Cancel.

The result is true if OK is pressed and false otherwise.

Not unic
let isBoss = confirm("Are you the boss?");

alert( isBoss ); // true if OK is pressed
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!' );
}
Addition +,
Subtraction -,
Multiplication *,
Division /,
Remainder %,
Exponentiation **.
alert( 6 - '2' ); // 4, converts '2' to a number
alert( '6' / '2' ); // 3, converts both operands to numbers
Katta/kichik: a > b, a < b.
Katta/kichik yoki teng: a >= b, a <= b.
Teng: a == b, esda tutingki, qo'shaloq tenglik belgisi == tenglik testini bildiradi, bitta a = b esa topshiriqni bildiradi.
Teng emas: matematikada yozuv ≠, lekin JavaScript-da u != b shaklida yozilgan.
Katta/kichik: a > b, a < b.
Katta/kichik yoki teng: a >= b, a <= b.
Teng: a == b, esda tutingki, qo'shaloq tenglik belgisi == tenglik testini bildiradi, bitta a = b esa topshiriqni bildiradi.
Teng emas: matematikada yozuv ≠ , lekin JavaScript-da u != b shaklida yozilgan.
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!' );
}