maryluis 4 лет назад
Родитель
Сommit
5107f7e69e
1 измененных файлов с 9 добавлено и 3 удалено
  1. 9 3
      homework5js/script.js

+ 9 - 3
homework5js/script.js

@@ -107,16 +107,22 @@ function declarativeFriends() {
 //////////////
 
 
-/////
+/////Я толком не поняла что имеется ввиду, потому написала два варианта, надеюсь хоть один из них верный.
 /////imperative array fill 3
-debugger
 function imperativeArray() {
     let imperative = [];
     imperative[0] = prompt("How old are you?"), imperative[1] = prompt("How old is your father?"), imperative[2] = prompt("How old is your mother?")
     alert("So you are " + imperative[0] + " years old. Your father is " + imperative[1] + " and mother is " + imperative[2])
 }
-imperativeArray()
+// imperativeArray()
 ////////
+function imperativeArray2() {
+    var imperative = [];
+    imperative.push((prompt("How old are you?")),(prompt("How old is your father?")), (prompt("How old is your father?")));
+    alert("So you are " + imperative[0] + " years old. Your father is " + imperative[1] + " and mother is " + imperative[2])
+}
+// imperativeArray2()
+
 
 
 //////