How to make unlimited user loop?

Posts 1–2 of 2 · Page 1 of 1
How to make unlimited user loop?
Hello,

so i'm trying to make a program which prompts the user for like class name, grade, and class hours
It should repeartdly ask him until he inputs an emmpty string.

1) i don't know how to make the unlimited loop until empty is put in.

one the user inputs those 3 inputs, then I want to be able to assign letter grades depending on his answers
2) so it will give me answer point grade by dividing number of grades earned by the number of class hours.



This is my first time tackling website dev, so i'm a complete beginner.,
Quote Originally Posted by Fliest_aladdin View Post
Hello,

so i'm trying to make a program which prompts the user for like class name, grade, and class hours
It should repeartdly ask him until he inputs an emmpty string.

1) i don't know how to make the unlimited loop until empty is put in.

one the user inputs those 3 inputs, then I want to be able to assign letter grades depending on his answers
2) so it will give me answer point grade by dividing number of grades earned by the number of class hours.



This is my first time tackling website dev, so i'm a complete beginner.,
Code:
var grade='';
var clases='';
var hours='';
while(grade==='')
{
grade=prompt("Enter Grades");
}
while(clases==='')
{
clases=prompt("Enter Class");
}
while(hours==='')
{
hours=prompt("Enter Hours");
}
alert("Your grade is "+(hours/grade)); //assign grades alternative to the value
Posts 1–2 of 2 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

None

Need help?