if suppose i have a programme like below:
for(var char in elem_text_ary) {
//console.log(elem_text_ary[char].charAt(0));
for(var desired_chars in desired_Chars){
if(elem_text_ary[char].charAt(0) === desired_Chars[desired_chars].toUpperCase()) {
console.log(elem_text_ary[char].charAt(0));
heading_arr.push( '<span>' + elem_text_ary[char].charAt(0) + '</span>' + elem_text_ary[char].slice(1 , elem_text_ary[char].length) );
console.log(heading_arr);
/*return;*/
} else {
heading_arr.push( elem_text_ary[char].slice(0 , elem_text_ary[char].length ));
/*return;*/
}
} // end for in loop
//return false;
} // end for in loop;
now see how there is two for in
, now suppose i find what i want to in the 2nd for..in , I.E. if either the if
or the else
condition is met , how do i exit the internal for..in
loop and tell the external for..in loop to continue ?
Thank you.
Alex-z.