Pavel 7 years ago
parent
commit
0c3304efaf
1 changed files with 15 additions and 15 deletions
  1. 15 15
      js03/js03.md

+ 15 - 15
js03/js03.md

@@ -359,22 +359,22 @@ for (var i = 0; i < predictArray.length; i++) {
 }
 
 while(true){
-if(predictArray[histor[0]][histor[1]][histor[2]][histor[3]] > -1)
-	console.log(predictArray[histor[0]][histor[1]][histor[2]][histor[3]]);
-else{
-	console.log(Math.floor(Math.random() * 2) + "rand");
-}
+	if(predictArray[histor[0]][histor[1]][histor[2]][histor[3]] > -1)
+		console.log(predictArray[histor[0]][histor[1]][histor[2]][histor[3]]);
+	else{
+		console.log(Math.floor(Math.random() * 2) + "rand");
+	}
 
-var userNumber = prompt("Введите 0 или 1");
-if(userNumber === "1" || userNumber === "0"){
-	parseInt(userNumber);
-}
-else{
-	break;
-}
-predictArray[histor[0]][histor[1]][histor[2]][histor[3]] = userNumber;
-histor.push(userNumber);
-histor.shift();
+	var userNumber = prompt("Введите 0 или 1");
+	if(userNumber === "1" || userNumber === "0"){
+		parseInt(userNumber);
+	}
+	else{
+		break;
+	}
+	predictArray[histor[0]][histor[1]][histor[2]][histor[3]] = userNumber;
+	histor.push(userNumber);
+	histor.shift();
 }
 
 ```