|
@@ -20,9 +20,9 @@ const obj = {}
|
|
let x = (5; + 10)
|
|
let x = (5; + 10)
|
|
console.log(x)
|
|
console.log(x)
|
|
|
|
|
|
-let age = prompt('how old are you?');
|
|
|
|
-alert(`you were born in ${2021 - age}`)
|
|
|
|
-(0 °C × 9/5) + 32 = 32 °F
|
|
|
|
|
|
+let age1 = prompt('how old are you?');
|
|
|
|
+alert(`you were born in ${2022 - age1}`)
|
|
|
|
+// (0 °C × 9/5) + 32 = 32 °F
|
|
let celsius = prompt('Enter the temperature in ℃')
|
|
let celsius = prompt('Enter the temperature in ℃')
|
|
alert(`${celsius * 1.8 + 32} fahrenheit`);
|
|
alert(`${celsius * 1.8 + 32} fahrenheit`);
|
|
|
|
|
|
@@ -92,7 +92,7 @@ let dog = {
|
|
|
|
|
|
dog["favorite food"].push('egg yolk')
|
|
dog["favorite food"].push('egg yolk')
|
|
|
|
|
|
-var age = +prompt("Сколько вам лет?","");
|
|
|
|
|
|
+let age = +prompt("Сколько вам лет?","");
|
|
|
|
|
|
if(age < 0) {
|
|
if(age < 0) {
|
|
alert('возраст не может быть отрицательным')
|
|
alert('возраст не может быть отрицательным')
|