how to display a error message then proced further when the string doesnot matches by using for and if loop
1 view (last 30 days)
this is my program
prompt='Enter variable name';
if input does not matches with the list of variables then it must show an error 'Variable not found, please try again' (for three times) & if the user enters invalid variable for three times the program should be terminated.