|
@@ -0,0 +1,15 @@
|
|
|
+
|
|
|
+function promptUser(){var istory = [""]
|
|
|
+ var prom=prompt('Ввести последовательность из 4 цифр','')
|
|
|
+ istory.push(prom)
|
|
|
+var strHistory=istory.join('')
|
|
|
+var arrHistoriString=[strHistory]
|
|
|
+var UserValueForPre=prompt('For Predict','');
|
|
|
+var userlength=UserValueForPre.length
|
|
|
+var numbe =arrHistoriString[0].indexOf(UserValueForPre)+userlength
|
|
|
+var nextNumb=arrHistoriString[0][numbe]
|
|
|
+ document.getElementById('display').innerHTML=nextNumb
|
|
|
+}
|
|
|
+function displayHidden(){
|
|
|
+document.getElementById('display').hidden=false
|
|
|
+}
|