|
@@ -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()
|
|
|
+
|
|
|
|
|
|
|
|
|
//////
|