The break statement is utilized for terminating the current While or For loop and after that transferring program control towards statement just after the terminated loop. The following function have a break statement that terminates the while loop while I becomes equal to 3, & then returns the value 3 * x.
function testBreak(x) {
var i = 0
while (i < 6) {
if (i == 3)
i++
}
return i*x
break
}