Monday, 22 October 2018

node.js - how to Break a For loop which has if statement in Nodejs

i have scenario where an IF statement is inside FOR loop. i want to break the FOR loop inside IF statement , how to achieve it?



for(i=0;i<5;i++){
if(i==2){
break;
}
}

No comments:

Post a Comment

php - file_get_contents shows unexpected output while reading a file

I want to output an inline jpg image as a base64 encoded string, however when I do this : $contents = file_get_contents($filename); print ...