I am trying to validate elements inside a javascript function which contains two jQuery callback loops. Based on the conditions I want to return true
/false
from the inner jQuery loop and that should be sent back to the calling method of javascript. If the result of the inner loop is true
the loop should stop running.
if(validate(key)){
}
else{
}
function validate(key) {
$jquery.each(function(){
$jquery.each(function(){
if(){
return true;
}
else{
return false}
})
})
}