0
Hey friends. If I want to repeat same code after ending what should I do?
12 Answers
+ 1
Check out this code https://code.sololearn.com/WmkHemqyS4Om/?ref=app
The problem is that the function will loop forever.
+ 2
What, after ending course
+ 1
See this code ==
var a =prompt("write your doubt"," ");
if (a==maths){
alert ("yes")}
else {alert("no")}
/*what should i do ,if i want that after the conditional loop ended then it repeated all code again from var a to }*/
+ 1
"For" method.
+ 1
Declare a function and call her inside the function e.g. function a() {
some code...
// in the end call the function
a()
}
0
"For" method is for loop đ€đ€đ€đ€
0
Give a short example ,friend please .
0
Most thanks to you....can you send me a pdf or other sources where this method is explained .
0
What method?
0
That method which is use for repeated code again and again
0
Put it in a,function (a) and do a()a()
0
Just use for loop or while loop