Javascript function returning NaN even though value is a number : I am very irritated. Please note that I have researched this for 2 days and simply cant waste time on this anymore, thus this is my last resort. I am working on a course assignment where random questions are asked with 4 possible answers each. (This all runs in the console only, working with alert()). 

My issue is the score of the user. It is supposed to increment by 1 with each correct iteration and I attempted resolving this using a function, but the function returns NaN and I simply cant see the problem. Please have a look.

    //to hold score accumulation
       var s = 0;
              
       //function to increase score per correct answer        
       function incrementScore(){
        s++;
        return s;
      };
       
       //function to prompt user to enter/capture the answer & check whether its correct or not
       function captureAnswer(el){ //el is the parameter from the random question function
        var promptAnswer = prompt('Capture your answer here');

        if (promptAnswer === 'exit') {
          console.log('You entered ' + promptAnswer);
          console.log('Bye, thanks for playing');
          }else if (promptAnswer == el) {  
            console.log('You entered ' + promptAnswer);      
            console.log('Your answer is correct!');
            incrementScore();
            console.log('Your score is ' + s);
            displayQandA(); //calling random question function
          }else if (promptAnswer !== el) {
            console.log('You entered ' + promptAnswer);
            console.log('Your answer is wrong!');
            console.log('Your score remains ' + s);
            displayQandA(); //calling random question function
          } 
        };