<!DOCTYPE html><htmllang="en"><head><metacharset="UTF-8"></head><body><ul><li>1</li><li>2</li><li>3</li><li>4</li><li>5</li><li>6</li></ul><script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script><script>$("ul li").each(function(index){vartmpTxt=$(this).text();if(tmpTxt=="1"){console.log("Continue value "+tmpTxt);returntrue;}elseif(tmpTxt=="5"){console.log("Break value "+tmpTxt);returnfalse;}console.log("value "+tmpTxt);});</script></body></html>