vladislavaSim 2 yıl önce
ebeveyn
işleme
d12899d344
1 değiştirilmiş dosya ile 4 ekleme ve 4 silme
  1. 4 4
      HW2/main.js

+ 4 - 4
HW2/main.js

@@ -20,9 +20,9 @@ const obj = {}
 let x = (5; + 10)
 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 ℃')
 alert(`${celsius * 1.8 + 32} fahrenheit`);
 
@@ -92,7 +92,7 @@ let dog = {
 
 dog["favorite food"].push('egg yolk')
 
-var age = +prompt("Сколько вам лет?","");
+let age = +prompt("Сколько вам лет?","");
 
 if(age < 0) {
     alert('возраст не может быть отрицательным')