exit while loop javascript code example

Example 1: exit program js

process.exit(1)

Example 2: break in if statement js

breakme: if (condition) {
    // Do stuff

    if (condition2){
        // do stuff
    } else {
       break breakme;
    }

    // Do more stuff
}

Example 3: exit popup javascript

window.bioEp = {
	// Private variables
	bgEl: {},
	popupEl: {},
	closeBtnEl: {},
	shown: false,
	overflowDefault: "visible",
	transformDefault: "",
	
	// Popup options
	width: 400,
	height: 220,
	html: "",
	css: "",
	fonts: [],
	delay: 5,
	showOnDelay: false,
	cookieExp: 30,
	
	// Handle creating, reading, and deleting cookies
	cookieManager: {
		// Create a cookie
		create: function() {},
		
		// Get the value of a cookie
		get: function() {},
		
		// Delete a cookie
		erase: function() {}
	},
	
	// Check for cookie
	checkCookie: function() {},
	
	// Add font stylesheets and CSS for the popup
	addCSS: function() {},
	
	// Add the popup to the page
	addPopup: function() {},
	
	// Show the popup
	showPopup: function() {},
	
	// Hide the popup
	hidePopup: function() {},
	
	// Handle scaling the popup
	scalePopup: function() {},
	
	// Load event listeners for the popup
	loadEvents: function() {},
	
	// Set user defined options for the popup
	setOptions: function() {},

	// Ensure the DOM has loaded
	domReady: function() {}
	
	// Initialize
	init: function() {}
}