Interactive multiple choice code
Bad names!!


Very poor naming, so much so that your code is almost unreadable and definitely unusable.
Use constants for variables that do not change. eg var n1= should be const n =
Always! indent your code.
Spaces between operators var n1=prompt( should be var n1 = prompt( 
else on same line as closing } eg } else if (
Use === rather than == and !== rather than !=
The code is broken and throws errors because you have missing function calls. Next time you post on code review please make sure that the code works, or clearly mark code stubs.
A lot of repeated code could be put together as a function.


eg Ask question function

function askQuestion(message, yesCall, noCall, unsureCall) {
    const result = prompt(message, "").toLowerCase();
    if ( result === "y") { yesCall() }
    else if (result === "n") { noCall() }
    else if (result === "i") { unsureCall() }
    else { askQuestion(message, yesCall, noCall, unsureCall) }
}


Then you can ask the question 

function mcs1() {
    askQuestion(
        "Do you have Medicare benefits (Y=Yes, N=No, I=I don't know)",
         mcs2, mcs1a, mcs1b
    );
}


User friendly

When creating interfaces you should never have ask the user to correct themselves due to improper use of the interface. 

If you ask for a Y or N and you can not control the keys, don't respond with "Enter a valid choice Y,N or I!" as it is a pointless and frustrating step for the user. Just ask the question again. "Try again... Do you have Medicare benefits? Y/N"  

Best is to ensure that the user can only make correct selections.

Use String.toLowerCase() or String.toUpperCase() to eliminate the need to differentiate between upper and lower case input.

Use a dialog with clickable options, or vet the key inputs with a keyboard event listener (not available on prompt) 

Alert and Prompt are evil

Don't use prompts or alerts. Use the HTML5 element dialog (or use standard HTML) and create custom dialogs. 

Custom dialogs  are non blocking and let you control the inputs, style, and much more. Giving a much better feel and flow to the interrogation.

See example how to use &lt;dialog&gt; element. (Note: full support for &lt;dialog&gt; element is only on Chrome for the moment. A polyfill can be found on MDN dialog reference page.)

Separate questions from code.

You have coded the questions into the source such that if you make a change to the questions you will need to make changes to the source code. 

These types of apps (survey or interrogations) are generally a class of finite state machine. The state (a question or message) will always follow a previous known state, and the following state will depend on the current answer. 

Seperate the state flow from the logic in such a way that you do not need to code the questions. You should be able to present any list of questions as a dataset (eg JSON) without needing to change any of the source code.

If the data structure is well defined, it also allows for non coders to create and change the interrogation.

An example.

The example may be a little advanced but have a look anyways, take what you can and feel free to ask questions in the comments.


It uses the dialog element to create the dialogs.
Async functions and promises to wait for user input.
Event listeners to get user clicks.
Defines a state machine via the object interrogation that uses named properties to connect states. The function interrogate takes a state name and use it to determine how to present and act on that state.




setTimeout(()=&gt;interrogate("start"),0);

/* Structure of interrogation All names are case sensitive [] means optional
  name: { // state name
    [action]: string, // one of two actions "reset" or "showResult"
    [question]: string,  //  The question if included the must have Y,N and/or [I]
    [Y]: string  // name of state for yes result
    [N]: string  // name of state for no result
    [I]: string  // name of state for unsure result
    [message]: string, // Message to display. This is only optional if question is defined
    [next]: string // name of next state. If omitted then defaults to "exit"
  }
*/

const interrogation = {
    results: "",
    start: {
        action: "reset",
        question: "Do you have Medicare benefits?",
        Y: "partsAB",
        N: "deniedMedicare",
        I: "refSocialSecurityAdministration"
    },
    partsAB: {
        question: "Do you have Medicare Part A AND B",
        Y: "applyForHF",
        N: "unknown",
        I: "unknown"      
    },
    applyForHF: {
        question: "Would you like to apply for HF MEdicare",
        Y: "applyForHFInfo",
        N: "haveCaretaker"
    },
    haveCaretaker: {
        question: "Do you have a caretaker relative who claims you on their taxes",
        Y: "haveCaretakerInfo",
        N: "dontHaveCaretakerInfo", 
    },
    deniedMedicare: {
        question: "Have you applied and been denied Medicare Coverage",
        Y: "unknown",
        N: "unknown",      
    },   
    startAgain: {
        question: "Would you like to restart?",
        Y: "start",
        N: "exit",              
    },
    unknown: {
        message: "Arrrghhhh. computer meltdown.. the pain, the pain... :P",
        next: "startAgain",
    },
    refSocialSecurity: {
        message: "Refer to Social Security to apply for the other part (Code E01M1)!"
    },
    refSocialSecurityAdministration: {
        message: "Refer to Social Security Administration to check status (Code E01M1)!"    
    },
    haveCaretakerInfo: {
        message: "Follow standard prequalification with caretaker relative as the income."
    },
    dontHaveCaretakerInfo: {
        message: "Refer to the HRA/LDSS/SLDSS to apply for benefits (CODE E01H)",
    },
    applyForHFInfo: {
        message: "Transfer to Medicare Advertising to apply for HealthFirst Medicare"
    },
    exit: {
        action: "showResult",
        message: "Thank you for your participation.",
    },
}

async function askQuestion(message, includeNotSure) {
    return new Promise(selectionMade =&gt; {
        quesionMenuEl.addEventListener("click", event =&gt; {
            selectionMade(event.target.value);
            event.preventDefault();  // stops the dialog from permanently closing
            questionDialog.close();
        }, {once: true});
        questiomMessageEl.textContent = message;
        notSureButton.style.display = includeNotSure ? null : "none"; //null is default 
        questionDialog.showModal();
    });
}
async function showMessage(message) {
    return new Promise(selectionMade =&gt; {
        messageMenuEl.addEventListener("click", event =&gt; {
            messageDialog.close();
            event.preventDefault(); // stops the dialog from permanently closing
            selectionMade("OK");
        }, {once: true});
        messageMessageEl.textContent = message;
        messageDialog.showModal();
    });
}
function interrogate(stateName = "exit") {
    const state = interrogation[stateName];
    if(state.action === "reset") { interrogation.results = "" }
    else if(state.action === "showResult") { console.log("Result: " + interrogation.results) }
    if (state.question) { 
        askQuestion(state.question, state.I !== undefined)
            .then(result =&gt; {
                if (result !== undefined) {
                    interrogation.results += result;
                    interrogate(state[result]);
                } else {
                    interrogate(stateName); // clicked outside button
                }
            });            
    } else if (state.message) {
        showMessage(state.message)
            .then(() =&gt; {
                if (stateName !== "exit") { interrogate(state.next) } 
            });
    }
}
&lt;dialog id="questionDialog"&gt;
  &lt;form method="dialog"&gt;
    &lt;p id = "questiomMessageEl"&gt;&lt;/p&gt;
    &lt;menu id="quesionMenuEl"&gt;
      &lt;button value="Y"&gt;Yes&lt;/button&gt;
      &lt;button value="N"&gt;No&lt;/button&gt;
      &lt;button value="I" id="notSureButton"&gt;Not sure&lt;/button&gt;
    &lt;/menu&gt;
  &lt;/form&gt;
&lt;/dialog&gt;
&lt;dialog id="messageDialog"&gt;
  &lt;form method="dialog"&gt;
    &lt;p id="messageMessageEl"&gt;&lt;/p&gt;
    &lt;menu id="messageMenuEl"&gt;
      &lt;button value="ok"&gt;OK&lt;/button&gt;
    &lt;/menu&gt;
  &lt;/form&gt;
&lt;/dialog&gt;