Acrynm While Loop

by Elijah Tate

JavaScript

var running = true;

function title(){
    alert("title");
}

function menu(){
    while(running == true){
    	title();
 		alert("1 - Find the definition for an acronym, 2 - Add a some numbers, 0 - Quit");        
    	var choice = prompt("Please input your value");
    	getResponse(choice);
    }
}

function getResponse(choice){
    if(choice == 0){
        alert("Goodbye");
        running = false;
    }else if(choice == 1){
        alert("I am looking up your definition");
    }else if(choice == 2){
        alert("I haven't heard that one!");
    }
}

menu();