I am trying to validate the user input in my the case the input is the color name entered by user, here is the code snippet
let valideColor = false;
do{
const selected_color = $('#SelectedColorPicker').val();
if (selected_color === '') {
console.log('Not valid')
}
else {
validColor = true;
}
}while(!validColor)
the code above produces an infinite loop leading my browser to crash, I would appreciate if anyone can tell me where the problem is .
requiredattribute, or an event, more likechangeevent to check that. And changeconsttoletorvar...